<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="robots" content="index, follow, all" />
    <title>Redis | PhpRedis API</title>

                <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
        <link rel="stylesheet" type="text/css" href="css/bootstrap-theme.min.css">
        <link rel="stylesheet" type="text/css" href="css/doctum.css">
        <link rel="stylesheet" type="text/css" href="fonts/doctum-font.css">
        <script src="js/jquery-3.5.1.slim.min.js"></script>
        <script async defer src="doctum.js"></script>
        <script async defer src="js/bootstrap.min.js"></script>
        <script async defer src="js/autocomplete.min.js"></script>
        <meta name="MobileOptimized" content="width">
        <meta name="HandheldFriendly" content="true">
        <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
    <link rel="stylesheet" type="text/css" href="css/highlight-github.min.css">
    <script defer src="js/highlight.min.js"></script>
    <script>
        window.addEventListener('load', function () {
            if (!window.hljs) {
                return;
            }

            function ensureCustomClassesAreBuiltIn() {
                var classesToAdd = ['Redis', 'RedisCluster', 'RedisArray'];

                if (!hljs.getLanguage) {
                    return;
                }

                var phpLanguage = hljs.getLanguage('php');
                if (!phpLanguage || !phpLanguage.keywords) {
                    return;
                }

                var builtIns = phpLanguage.keywords.built_in;
                if (!builtIns) {
                    phpLanguage.keywords.built_in = classesToAdd.join(' ');
                    return;
                }

                if (Array.isArray(builtIns)) {
                    classesToAdd.forEach(function (className) {
                        if (builtIns.indexOf(className) === -1) {
                            builtIns.push(className);
                        }
                    });
                    return;
                }

                if (typeof builtIns === 'string') {
                    classesToAdd.forEach(function (className) {
                        if (builtIns.indexOf(className) === -1) {
                            builtIns += ' ' + className;
                        }
                    });
                    phpLanguage.keywords.built_in = builtIns;
                }
            }

            function collectLinkMetadata(container, typeText) {
                var anchors = container.querySelectorAll('a');
                var lastIndex = 0;
                var meta = [];

                for (var i = 0; i < anchors.length; i++) {
                    var anchor = anchors[i];
                    var text = anchor.textContent.trim();
                    if (!text) {
                        continue;
                    }

                    var href = anchor.getAttribute('href');
                    var start = typeText.indexOf(text, lastIndex);

                    if (start === -1) {
                        start = typeText.indexOf(text);
                        if (start === -1) {
                            continue;
                        }
                    }

                    meta.push({
                        start: start,
                        end: start + text.length,
                        href: href
                    });

                    lastIndex = start + text.length;
                }

                return meta;
            }

            function findTextPosition(container, targetIndex) {
                var walker = document.createTreeWalker(
                    container,
                    NodeFilter.SHOW_TEXT,
                    null
                );

                var currentIndex = 0;
                var currentNode;

                while ((currentNode = walker.nextNode())) {
                    var nextIndex = currentIndex + currentNode.textContent.length;

                    if (targetIndex <= nextIndex) {
                        return {
                            node: currentNode,
                            offset: targetIndex - currentIndex
                        };
                    }

                    currentIndex = nextIndex;
                }

                return null;
            }

            function restoreLinks(codeElement, meta) {
                var sorted = meta.slice().sort(function (a, b) {
                    return b.start - a.start;
                });

                for (var i = 0; i < sorted.length; i++) {
                    var info = sorted[i];
                    var startPos = findTextPosition(codeElement, info.start);
                    var endPos = findTextPosition(codeElement, info.end);

                    if (!startPos || !endPos) {
                        continue;
                    }

                    var range = document.createRange();
                    range.setStart(startPos.node, startPos.offset);
                    range.setEnd(endPos.node, endPos.offset);

                    var anchor = document.createElement('a');
                    anchor.setAttribute('href', info.href);
                    anchor.appendChild(range.extractContents());
                    range.insertNode(anchor);
                    range.detach();
                }
            }

            function highlightAndRestore(codeElement, metadata) {
                hljs.highlightElement(codeElement);

                if (metadata && metadata.length) {
                    restoreLinks(codeElement, metadata);
                }
            }

            ensureCustomClassesAreBuiltIn();

            var exampleBlocks = document.querySelectorAll('pre.examples');
            exampleBlocks.forEach(function (block) {
                if (!block.dataset.language) {
                    block.dataset.language = 'php';
                }
                block.classList.add('language-php');
                hljs.highlightElement(block);
            });

            var signatureBlocks = document.querySelectorAll('code.method-signature');
            signatureBlocks.forEach(function (block) {
                if (!block.classList.contains('language-php')) {
                    block.classList.add('language-php');
                }
                hljs.highlightElement(block);
            });

            var phpCodeBlocks = document.querySelectorAll('pre code.language-php');
            phpCodeBlocks.forEach(function (block) {
                if (block.classList.contains('method-signature')) {
                    return;
                }

                if (block.closest('pre.examples')) {
                    return;
                }

                if (block.parentElement && !block.parentElement.classList.contains('language-php')) {
                    block.parentElement.classList.add('language-php');
                }

                hljs.highlightElement(block);
            });

            highlightReturnTypes();
            highlightMethodParameters();
            highlightApiIndex();

            function highlightReturnTypes() {
                if (!document.createTreeWalker || !window.NodeFilter) {
                    return;
                }

                var containers = document.querySelectorAll('.return-value-content');
                containers.forEach(function (container) {
                    var table = container.querySelector('table');
                    if (!table) {
                        return;
                    }

                    table.querySelectorAll('tr').forEach(function (row) {
                        var typeCell = row.querySelector('td');
                        if (!typeCell || typeCell.querySelector('code.return-type')) {
                            return;
                        }

                        var typeText = typeCell.textContent.trim();
                        if (!typeText) {
                            return;
                        }

                        var linkMeta = collectLinkMetadata(typeCell, typeText);
                        var code = document.createElement('code');
                        code.className = 'return-type language-php';
                        code.textContent = typeText;

                        typeCell.innerHTML = '';
                        typeCell.appendChild(code);

                        highlightAndRestore(code, linkMeta);
                    });
                });
            }

            function highlightMethodParameters() {
                if (!document.createTreeWalker || !window.NodeFilter) {
                    return;
                }

                var headings = document.querySelectorAll('.tags > h4');
                headings.forEach(function (heading) {
                    if (!heading.textContent || heading.textContent.trim() !== 'Parameters') {
                        return;
                    }

                    var table = heading.nextElementSibling;
                    while (table && table.tagName !== 'TABLE') {
                        table = table.nextElementSibling;
                    }

                    if (!table) {
                        return;
                    }

                    table.querySelectorAll('tr').forEach(function (row) {
                        var cells = row.querySelectorAll('td');
                        if (!cells.length) {
                            return;
                        }

                        enhanceParameterCell(cells[0], 'parameter-type');

                        if (cells.length > 1) {
                            enhanceParameterCell(cells[1], 'parameter-name');
                        }
                    });
                });

                function enhanceParameterCell(cell, className) {
                    if (!cell || cell.querySelector('code.' + className)) {
                        return;
                    }

                    var cellText = cell.textContent.trim();
                    if (!cellText) {
                        return;
                    }

                    var meta = collectLinkMetadata(cell, cellText);
                    var code = document.createElement('code');
                    code.className = className + ' language-php';
                    code.textContent = cellText;

                    cell.innerHTML = '';
                    cell.appendChild(code);

                    highlightAndRestore(code, meta);
                }
            }

            function highlightApiIndex() {
                if (!document.createTreeWalker || !window.NodeFilter) {
                    return;
                }

                var potentialContainers = document.querySelectorAll('.container-fluid.underlined');
                var containers = [];
                var anchorSelector = '.row .col-md-8 > a[href^="#method_"]';

                for (var i = 0; i < potentialContainers.length; i++) {
                    var candidate = potentialContainers[i];
                    if (!candidate.querySelector(anchorSelector)) {
                        continue;
                    }

                    var heading = candidate.previousElementSibling;
                    if (heading && heading.tagName === 'H2' && heading.textContent && heading.textContent.trim() === 'Methods') {
                        containers.push(candidate);
                    }
                }

                if (!containers.length) {
                    return;
                }

                for (var j = 0; j < containers.length; j++) {
                    var container = containers[j];
                    var rows = container.querySelectorAll('.row');

                    for (var k = 0; k < rows.length; k++) {
                        var row = rows[k];
                        enhanceTypeCell(row.querySelector('.col-md-2.type'));
                        enhanceSignatureCell(row.querySelector('.col-md-8'));
                    }
                }

                function enhanceTypeCell(typeCell) {
                    if (!typeCell || typeCell.querySelector('code.method-index-type')) {
                        return;
                    }

                    var typeText = typeCell.textContent.trim();
                    if (!typeText) {
                        return;
                    }

                    var meta = collectLinkMetadata(typeCell, typeText);

                    var code = document.createElement('code');
                    code.className = 'method-index-type language-php';
                    code.textContent = typeText;

                    typeCell.innerHTML = '';
                    typeCell.appendChild(code);

                    highlightAndRestore(code, meta);
                }

                function enhanceSignatureCell(signatureCell) {
                    if (!signatureCell || signatureCell.querySelector('code.method-index-signature')) {
                        return;
                    }

                    var descriptionStart = null;
                    for (var i = 0; i < signatureCell.children.length; i++) {
                        var child = signatureCell.children[i];
                        if (child.tagName === 'P') {
                            descriptionStart = child;
                            break;
                        }
                    }

                    var nodesToProcess = [];
                    var current = signatureCell.firstChild;
                    while (current && current !== descriptionStart) {
                        nodesToProcess.push(current);
                        current = current.nextSibling;
                    }

                    if (!nodesToProcess.length) {
                        return;
                    }

                    var signatureText = '';
                    for (var j = 0; j < nodesToProcess.length; j++) {
                        signatureText += nodesToProcess[j].textContent || '';
                    }
                    signatureText = signatureText.replace(/\s+/g, ' ').trim();

                    if (!signatureText) {
                        return;
                    }

                    var tempWrapper = document.createElement('div');
                    for (var k = 0; k < nodesToProcess.length; k++) {
                        tempWrapper.appendChild(nodesToProcess[k].cloneNode(true));
                    }

                    var meta = collectLinkMetadata(tempWrapper, signatureText);

                    for (var l = 0; l < nodesToProcess.length; l++) {
                        if (nodesToProcess[l].parentNode === signatureCell) {
                            signatureCell.removeChild(nodesToProcess[l]);
                        }
                    }

                    var code = document.createElement('code');
                    code.className = 'method-index-signature language-php';
                    code.textContent = signatureText;

                    signatureCell.insertBefore(code, descriptionStart);

                    highlightAndRestore(code, meta);
                }
            }
        });
    </script>


        <link rel="search"
          type="application/opensearchdescription+xml"
          href="https://phpredis.github.io/opensearch.xml"
          title="PhpRedis API (develop)" />
    </head>

    <body id="class" data-name="class:Redis" data-root-path="" data-search-index-url="doctum-search.json">
            <div id="content">
        <div id="left-column">
                <div id="control-panel">
                <div class="search-bar hidden" id="search-progress-bar-container">
            <div class="progress">
                <div class="progress-bar" role="progressbar" id="search-progress-bar"
                    aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%"></div>
            </div>
        </div>
        <form id="search-form" action="search.html">
            <span class="icon icon-search"></span>
            <input name="search"
                   id="doctum-search-auto-complete"
                   class="typeahead form-control"
                   type="search"
                   placeholder="Search"
                   spellcheck="false"
                   autocorrect="off"
                   autocomplete="off"
                   autocapitalize="off">
            <div class="auto-complete-results" id="auto-complete-results"></div>
        </form>
    </div>

                <div id="api-tree"></div>

        </div>
        <div id="right-column">
                <nav id="site-nav" class="navbar navbar-default" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-elements">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="index.html">PhpRedis API</a>
            </div>
            <div class="collapse navbar-collapse" id="navbar-elements">
                <ul class="nav navbar-nav">
                    <li><a href="classes.html">Classes</a></li>
                    <li><a href="interfaces.html">Interfaces</a></li>
                    <li><a href="traits.html">Traits</a></li>
                    <li><a href="doc-index.html">Index</a></li>
                    <li><a href="search.html">Search</a></li>
                </ul>
            </div>
        </div>
    </nav>

                            <div id="page-content">
    <div class="page-header">
        <h1>Redis    
            </h1>
    </div>

    
    <p>        class
    <strong>Redis</strong>        (<a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php">View source</a>)
</p>

        
    
        

            
        
            <h2>Constants</h2>    <table class="table table-condensed">
                    <tr>
                <td>
                                                                                                                        REDIS_NOT_FOUND
                                    </td>
                <td class="last">
                    <p><em><p>Returned by <code>\Redis::type()</code> when the key does not exist or has a type
we are not familiar with.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        REDIS_STRING
                                    </td>
                <td class="last">
                    <p><em><p>Returned by <code>\Redis::type()</code> when the key is a string.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        REDIS_SET
                                    </td>
                <td class="last">
                    <p><em><p>Returned by <code>\Redis::type()</code> when the key is a set.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        REDIS_LIST
                                    </td>
                <td class="last">
                    <p><em><p>Returned by <code>\Redis::type()</code> when the key is a list.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        REDIS_ZSET
                                    </td>
                <td class="last">
                    <p><em><p>Returned by <code>\Redis::type()</code> when the key is a sorted set.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        REDIS_HASH
                                    </td>
                <td class="last">
                    <p><em><p>Returned by <code>\Redis::type()</code> when the key is a hash.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        REDIS_STREAM
                                    </td>
                <td class="last">
                    <p><em><p>Returned by <code>\Redis::type()</code> when the key is a stream.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        REDIS_VECTORSET
                                    </td>
                <td class="last">
                    <p><em><p>Returned by <code>\Redis::type()</code> when the key is a vector set.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        ATOMIC
                                    </td>
                <td class="last">
                    <p><em><p>Returned from <code>\Redis::getMode()</code> when we're not in a multi or pipeline
transaction.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        MULTI
                                    </td>
                <td class="last">
                    <p><em><p>Returned from <code>\Redis::getMode()</code> when we're in a multi transaction.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        PIPELINE
                                    </td>
                <td class="last">
                    <p><em><p>Returned from <code>\Redis::getMode()</code> when we're in a pipeline transaction.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        OPT_SERIALIZER
                                    </td>
                <td class="last">
                    <p><em><p>Used with <code>\Redis::setOption()</code> to specify the serializer to use</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        OPT_PREFIX
                                    </td>
                <td class="last">
                    <p><em><p>Used to set an automatic prefix for keys used in commands.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        OPT_READ_TIMEOUT
                                    </td>
                <td class="last">
                    <p><em><p>Used to set the read timeout for the connection.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        OPT_TCP_KEEPALIVE
                                    </td>
                <td class="last">
                    <p><em><p>Used to enable or disable TCP keepalive on the connection.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        OPT_COMPRESSION
                                    </td>
                <td class="last">
                    <p><em><p>Used to set the compression algorithm to use for compressing</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        OPT_REPLY_LITERAL
                                    </td>
                <td class="last">
                    <p><em><p>Causes PhpRedis to return the actual string in <code>+OK</code> style responses
from Redis. If disabled those replies are just converted to boolean
true.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        OPT_COMPRESSION_LEVEL
                                    </td>
                <td class="last">
                    <p><em><p>Used to specify the compression level to use when compressing data.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        OPT_NULL_MULTIBULK_AS_NULL
                                    </td>
                <td class="last">
                    <p><em><p>Tells PhpRedis to return a NULL multi-bulk (<code>*-1\r\n</code>) response
as <code>null</code> as opposed to an empty array.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        OPT_PACK_IGNORE_NUMBERS
                                    </td>
                <td class="last">
                    <p><em><p>When enabled, this option tells PhpRedis to ignore purely numeric values
when packing and unpacking data. This does not include numeric strings.</p></em></p>
                    <p><p>If you want numeric strings to be ignored, typecast them to an int or
float.</p>
<p>The primary purpose of this option is to make it more ergonomic when
setting keys that will later be incremented or decremented.</p>
<p>Note: This option incurs a small performance penalty when reading data
because we have to see if the data is a string representation of an int
or float.</p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        SERIALIZER_NONE
                                    </td>
                <td class="last">
                    <p><em><p>Sets the serializer to none (no serialization).</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        SERIALIZER_PHP
                                    </td>
                <td class="last">
                    <p><em><p>Sets the serializer to PHP's built-in <code>serialize()</code>/<code>unserialize()</code></p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        SERIALIZER_IGBINARY
                                    </td>
                <td class="last">
                    <p><em><p>Sets the serializer to igbinary. Note that phpredis must be compiled
with ighbinary support to use this serializer.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        SERIALIZER_MSGPACK
                                    </td>
                <td class="last">
                    <p><em><p>Sets the serializer to msgpack. Note that phpredis must be compiled
with msgpack support to use this serializer.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        SERIALIZER_JSON
                                    </td>
                <td class="last">
                    <p><em><p>Sets the serializer to JSON.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        COMPRESSION_NONE
                                    </td>
                <td class="last">
                    <p><em><p>Disables compression.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        COMPRESSION_LZF
                                    </td>
                <td class="last">
                    <p><em><p>Sets the compression algorithm to LZF. PhpRedis must be compiled with
lzf support but this serializer is bundled with the extension.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        COMPRESSION_ZSTD
                                    </td>
                <td class="last">
                    <p><em><p>Sets the compression algorithm to ZSTD. PhpRedis must be compiled with
zstd support to use this serializer. This is often the best balance
between speed and compression ratio.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        COMPRESSION_ZSTD_DEFAULT
                                    </td>
                <td class="last">
                    <p><em><p>This constant represents the &quot;default&quot; compression level for ZSTD. If
PhpRedis is compiled against a new enough ZSTD the value comes from the
library, otherwise we just set it to 3.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        COMPRESSION_ZSTD_MIN
                                    </td>
                <td class="last">
                    <p><em><p>The minimum compression level ZSTD supports, which comes from the
underlying ZSTD library if new enough. Otherwise we just set it to 1.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        COMPRESSION_ZSTD_MAX
                                    </td>
                <td class="last">
                    <p><em><p>The maximum compression level ZSTD supports, which comes from the
underlying ZSTD library.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        COMPRESSION_LZ4
                                    </td>
                <td class="last">
                    <p><em><p>Set the compression algorithm to LZ4. PhpRedis must be compiled with
lz4 support to use this serializer. This algorithm is generally
the fastest but has a lower compression ratio than ZSTD.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        OPT_SCAN
                                    </td>
                <td class="last">
                    <p><em><p>Used with <code>\Redis::setOption()</code> to specify scan options.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        SCAN_RETRY
                                    </td>
                <td class="last">
                    <p><em><p>When enabled, this option causes PhpRedis to automatically retry <code>SCAN</code>
commands when Redis returns a non-zero cursor but no keys. This can
happen due to the nature of Redis' scanning algorithm.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        SCAN_NORETRY
                                    </td>
                <td class="last">
                    <p><em><p>Then enabled, this option tells PhpRedis to not retry <code>SCAN</code> commands
when Redis returns a non-zero cursor but no keys. This means that your
code must handle this case itself.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        SCAN_PREFIX
                                    </td>
                <td class="last">
                    <p><em><p>Tells PhpRedis to prefix keys returned from <code>SCAN</code> commands with the
currently set key prefix.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        SCAN_NOPREFIX
                                    </td>
                <td class="last">
                    <p><em><p>Tells PhpRedis to NOT prefix keys returned from <code>SCAN</code> commands with
the currently set key prefix.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        BEFORE
                                    </td>
                <td class="last">
                    <p><em><p>This is just the string &quot;before&quot; which is used with various  list
commands to indicate an insertion point.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        AFTER
                                    </td>
                <td class="last">
                    <p><em><p>This is just the string &quot;after&quot; which is used with various list commands
to indicate an insertion point.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        LEFT
                                    </td>
                <td class="last">
                    <p><em><p>This is just the string &quot;left&quot; which is used with various list commands
such as <code>LMOVE</code>.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        RIGHT
                                    </td>
                <td class="last">
                    <p><em><p>This is just the string &quot;right&quot; which is used with various list commands
such as <code>LMOVE</code>.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        OPT_MAX_RETRIES
                                    </td>
                <td class="last">
                    <p><em><p>How many times should <code>PhpRedis</code> attempt to reconnect when we are
disconnected.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        OPT_BACKOFF_ALGORITHM
                                    </td>
                <td class="last">
                    <p><em><p>Used to specify the backoff algorithm to use when reconnecting.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        BACKOFF_ALGORITHM_DEFAULT
                                    </td>
                <td class="last">
                    <p><em><p>Default backoff - random delay before the first retry, then constant <code>base</code> ms.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        BACKOFF_ALGORITHM_CONSTANT
                                    </td>
                <td class="last">
                    <p><em><p>Constant backoff - always sleep for exactly <code>base</code> ms (capped by <code>cap</code>).</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        BACKOFF_ALGORITHM_UNIFORM
                                    </td>
                <td class="last">
                    <p><em><p>Uniform backoff - randomly sleep between 0 and <code>base</code> ms for each retry.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        BACKOFF_ALGORITHM_EXPONENTIAL
                                    </td>
                <td class="last">
                    <p><em><p>Exponential backoff - doubles the delay every retry (up to 2^10) before <code>cap</code>.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        BACKOFF_ALGORITHM_FULL_JITTER
                                    </td>
                <td class="last">
                    <p><em><p>Full jitter - exponential delay but pick a random value between 0 and that delay.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        BACKOFF_ALGORITHM_EQUAL_JITTER
                                    </td>
                <td class="last">
                    <p><em><p>Equal jitter - half the exponential delay plus a random amount up to the other half.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        BACKOFF_ALGORITHM_DECORRELATED_JITTER
                                    </td>
                <td class="last">
                    <p><em><p>Decorrelated jitter - pick a random delay between <code>base</code> and 3x the previous delay.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        OPT_BACKOFF_BASE
                                    </td>
                <td class="last">
                    <p><em><p>Backoff base - minimum delay in milliseconds that algorithms start from.</p></em></p>
                    <p></p>
                </td>
            </tr>
                    <tr>
                <td>
                                                                                                                        OPT_BACKOFF_CAP
                                    </td>
                <td class="last">
                    <p><em><p>Backoff cap - maximum delay in milliseconds that any algorithm can reach.</p></em></p>
                    <p></p>
                </td>
            </tr>
            </table>

    
    
            <h2>Methods</h2>

            <div class="container-fluid underlined">
                    <div class="row">
                <div class="col-md-2 type">
                    <a href="Redis.html">Redis</a>
                </div>
                <div class="col-md-8">
                    <a href="#method___construct">__construct</a>(array|null $options = null)
        
                                            <p><p>Create a new Redis instance.  If passed sufficient information in the
options array it is also possible to connect to an instance at the same
time.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    
                </div>
                <div class="col-md-8">
                    <a href="#method___destruct">__destruct</a>()
        
                                            <p><p>Destructor to clean up the Redis object.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    string
                </div>
                <div class="col-md-8">
                    <a href="#method__compress">_compress</a>(string $value)
        
                                            <p><p>Compress a value with the currently configured compressor (Redis::OPT_COMPRESSION)
exactly the same way PhpRedis does before sending data to Redis.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    string
                </div>
                <div class="col-md-8">
                    <a href="#method__uncompress">_uncompress</a>(string $value)
        
                                            <p><p>Uncompress the provided argument using the compressor configured via
Redis::setOption() (Redis::OPT_COMPRESSION).</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    string
                </div>
                <div class="col-md-8">
                    <a href="#method__prefix">_prefix</a>(string $key)
        
                                            <p><p>Prefix the passed argument with the currently set key prefix as set
with Redis::setOption().</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    string
                </div>
                <div class="col-md-8">
                    <a href="#method__serialize">_serialize</a>(mixed $value)
        
                                            <p><p>Serialize the provided value with the currently set serializer as set
with Redis::setOption().</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method__unserialize">_unserialize</a>(string $value)
        
                                            <p><p>Unserialize the passed argument with the currently set serializer as set
with Redis::setOption().</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    string
                </div>
                <div class="col-md-8">
                    <a href="#method__pack">_pack</a>(mixed $value)
        
                                            <p><p>Pack the provided value by first serializing it (if Redis::OPT_SERIALIZER is set)
and then compressing the serialized payload (if Redis::OPT_COMPRESSION is set),
mirroring exactly what PhpRedis transmits to Redis.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    string
                </div>
                <div class="col-md-8">
                    <a href="#method__digest">_digest</a>(mixed $value)
        
                                            <p><p>Compute the XXH3 digest of a PHP value after it has been <code>_pack</code>ed, producing
the same digest Redis' DIGEST command would return for the stored value.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method__unpack">_unpack</a>(string $value)
        
                                            <p><p>Unpack the provided value by first uncompressing it (if Redis::OPT_COMPRESSION
is set) and then unserializing it (if Redis::OPT_SERIALIZER is set) to recover
the original PHP value.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_acl">acl</a>(string $subcmd, string ...$args)
        
                                            <p><p>Execute Redis ACL subcommands.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_append">append</a>(string $key, mixed $value)
        
                                            <p><p>Append data to a Redis STRING key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_auth">auth</a>(mixed $credentials)
        
                                            <p><p>Authenticate a Redis connection after its been established.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_bgSave">bgSave</a>()
        
                                            <p><p>Execute a save of the Redis database in the background.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_bgrewriteaof">bgrewriteaof</a>()
        
                                            <p><p>Asynchronously rewrite Redis' append-only file</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_waitaof">waitaof</a>(int $numlocal, int $numreplicas, int $timeout)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_bitcount">bitcount</a>(string $key, int $start = 0, int $end = -1, bool $bybit = false)
        
                                            <p><p>Count the number of set bits in a Redis string.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_bitop">bitop</a>(string $operation, string $deskey, string $srckey, string ...$other_keys)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_bitpos">bitpos</a>(string $key, bool $bit, int $start = 0, int $end = -1, bool $bybit = false)
        
                                            <p><p>Return the position of the first bit set to 0 or 1 in a string.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|null|false
                </div>
                <div class="col-md-8">
                    <a href="#method_blPop">blPop</a>(string|array $key_or_keys, string|float|int $timeout_or_key, mixed ...$extra_args)
        
                                            <p><p>Pop an element off the beginning of a Redis list or lists, potentially blocking up to a specified
timeout.  This method may be called in two distinct ways, of which examples are provided below.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|null|false
                </div>
                <div class="col-md-8">
                    <a href="#method_brPop">brPop</a>(string|array $key_or_keys, string|float|int $timeout_or_key, mixed ...$extra_args)
        
                                            <p><p>Pop an element off of the end of a Redis list or lists, potentially blocking up to a specified timeout.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_brpoplpush">brpoplpush</a>(string $src, string $dst, int|float $timeout)
        
                                            <p><p>Pop an element from the end of a Redis list, pushing it to the beginning of another Redis list,
optionally blocking up to a specified timeout.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_bzPopMax">bzPopMax</a>(string|array $key, string|int $timeout_or_key, mixed ...$extra_args)
        
                                            <p><p>POP the maximum scoring element off of one or more sorted sets, blocking up to a specified
timeout if no elements are available.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_bzPopMin">bzPopMin</a>(string|array $key, string|int $timeout_or_key, mixed ...$extra_args)
        
                                            <p><p>POP the minimum scoring element off of one or more sorted sets, blocking up to a specified timeout
if no elements are available</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|null|false
                </div>
                <div class="col-md-8">
                    <a href="#method_bzmpop">bzmpop</a>(float $timeout, array $keys, string $from, int $count = 1)
        
                                            <p><p>POP one or more elements from one or more sorted sets, blocking up to a specified amount of time
when no elements are available.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|null|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zmpop">zmpop</a>(array $keys, string $from, int $count = 1)
        
                                            <p><p>POP one or more of the highest or lowest scoring elements from one or more sorted sets.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|null|false
                </div>
                <div class="col-md-8">
                    <a href="#method_blmpop">blmpop</a>(float $timeout, array $keys, string $from, int $count = 1)
        
                                            <p><p>Pop one or more elements from one or more Redis LISTs, blocking up to a specified timeout when
no elements are available.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|null|false
                </div>
                <div class="col-md-8">
                    <a href="#method_lmpop">lmpop</a>(array $keys, string $from, int $count = 1)
        
                                            <p><p>Pop one or more elements off of one or more Redis LISTs.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_clearLastError">clearLastError</a>()
        
                                            <p><p>Reset any last error on the connection to NULL</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_client">client</a>(string $opt, mixed ...$args)
        
                                            <p><p>Execute Redis CLIENT subcommands.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_close">close</a>()
        
                                            <p><p>Closes the connection to Redis</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_command">command</a>(string|null $opt = null, mixed ...$args)
        
                                            <p><p>Execute Redis COMMAND subcommands.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_config">config</a>(string $operation, array|string|null $key_or_settings = null, string|null $value = null)
        
                                            <p><p>Execute the Redis CONFIG command in a variety of ways.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_connect">connect</a>(string $host, int $port = 6379, float $timeout = 0, string|null $persistent_id = null, int $retry_interval = 0, float $read_timeout = 0, array|null $context = null)
        
                                            <p><p>Connect to a Redis server</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_copy">copy</a>(string $src, string $dst, array|null $options = null)
        
                                            <p><p>Make a copy of a key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_dbSize">dbSize</a>()
        
                                            <p><p>Return the number of keys in the currently selected Redis database.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string
                </div>
                <div class="col-md-8">
                    <a href="#method_debug">debug</a>(string $key)
        
                                            <p><p>Execute the Redis <code>DEBUG</code> command. Note that this is disabled by default
and can be very dangerous, even allowing you to crash the server. Use
with caution</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_decr">decr</a>(string $key, int $by = 1)
        
                                            <p><p>Decrement a Redis integer by 1 or a provided value.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_decrBy">decrBy</a>(string $key, int $value)
        
                                            <p><p>Decrement a redis integer by a value</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_del">del</a>(array|string $key, string ...$other_keys)
        
                                            <p><p>Delete one or more keys from Redis.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_delex">delex</a>(string $key, array|null $options = null)
        
                                            <p><p>Delete a key conditionally based on its value or hash digest</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_delifeq">delifeq</a>(string $key, mixed $value)
        
                                            <p><p>Delete a key if it's equal to the specified value. This command is
specific to Valkey &gt;= 9.0</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_delete">delete</a>(array|string $key, string ...$other_keys)
        <small><span class="label label-danger">deprecated</span></small>
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_discard">discard</a>()
        
                                            <p><p>Discard a transaction currently in progress.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_dump">dump</a>(string $key)
        
                                            <p><p>Dump Redis' internal binary representation of a key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_echo">echo</a>(string $str)
        
                                            <p><p>Have Redis repeat back an arbitrary string to the client.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_eval">eval</a>(string $script, array $args = [], int $num_keys = 0)
        
                                            <p><p>Execute a LUA script on the redis server.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_eval_ro">eval_ro</a>(string $script_sha, array $args = [], int $num_keys = 0)
        
                                            <p><p>This is simply the read-only variant of eval, meaning the underlying script
may not modify data in redis.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_evalsha">evalsha</a>(string $sha1, array $args = [], int $num_keys = 0)
        
                                            <p><p>Execute a LUA script on the server but instead of sending the script, send
the SHA1 hash of the script.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_evalsha_ro">evalsha_ro</a>(string $sha1, array $args = [], int $num_keys = 0)
        
                                            <p><p>This is simply the read-only variant of evalsha, meaning the underlying script
may not modify data in redis.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_exec">exec</a>()
        
                                            <p><p>Execute either a MULTI or PIPELINE block and return the array of replies.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_exists">exists</a>(mixed $key, mixed ...$other_keys)
        
                                            <p><p>Test if one or more keys exist.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_expire">expire</a>(string $key, int $timeout, string|null $mode = null)
        
                                            <p><p>Sets an expiration in seconds on the key in question.  If connected to
redis-server &gt;= 7.0.0 you may send an additional &quot;mode&quot; argument which
modifies how the command will execute.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_expireAt">expireAt</a>(string $key, int $timestamp, string|null $mode = null)
        
                                            <p><p>Set a key to expire at an exact unix timestamp.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_failover">failover</a>(array|null $to = null, bool $abort = false, int $timeout = 0)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_expiretime">expiretime</a>(string $key)
        
                                            <p><p>Get the expiration of a given key as a unix timestamp</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_pexpiretime">pexpiretime</a>(string $key)
        
                                            <p><p>Get the expiration timestamp of a given Redis key but in milliseconds.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_fcall">fcall</a>(string $fn, array $keys = [], array $args = [])
        
                                            <p><p>Invoke a function.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_fcall_ro">fcall_ro</a>(string $fn, array $keys = [], array $args = [])
        
                                            <p><p>This is a read-only variant of the FCALL command that cannot execute commands that modify data.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_flushAll">flushAll</a>(bool|null $sync = null)
        
                                            <p><p>Deletes every key in all Redis databases</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_flushDB">flushDB</a>(bool|null $sync = null)
        
                                            <p><p>Deletes all the keys of the currently selected database.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool|string|array
                </div>
                <div class="col-md-8">
                    <a href="#method_function">function</a>(string $operation, mixed ...$args)
        
                                            <p><p>Functions is an API for managing code to be executed on the server.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_geoadd">geoadd</a>(string $key, float $lng, float $lat, string $member, mixed ...$other_triples_and_options)
        
                                            <p><p>Add one or more members to a geospacial sorted set</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|float|false
                </div>
                <div class="col-md-8">
                    <a href="#method_geodist">geodist</a>(string $key, string $src, string $dst, string|null $unit = null)
        
                                            <p><p>Get the distance between two members of a geospacially encoded sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_geohash">geohash</a>(string $key, string $member, string ...$other_members)
        
                                            <p><p>Retrieve one or more GeoHash encoded strings for members of the set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_geopos">geopos</a>(string $key, string $member, string ...$other_members)
        
                                            <p><p>Return the longitude and latitude for one or more members of a geospacially encoded sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_georadius">georadius</a>(string $key, float $lng, float $lat, float $radius, string $unit, array $options = [])
        
                                            <p><p>Retrieve members of a geospacially sorted set that are within a certain radius of a location.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_georadius_ro">georadius_ro</a>(string $key, float $lng, float $lat, float $radius, string $unit, array $options = [])
        
                                            <p><p>A readonly variant of <code>GEORADIUS</code> that may be executed on replicas.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_georadiusbymember">georadiusbymember</a>(string $key, string $member, float $radius, string $unit, array $options = [])
        
                                            <p><p>Similar to <code>GEORADIUS</code> except it uses a member as the center of the query.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_georadiusbymember_ro">georadiusbymember_ro</a>(string $key, string $member, float $radius, string $unit, array $options = [])
        
                                            <p><p>This is the read-only variant of <code>GEORADIUSBYMEMBER</code> that can be run on replicas.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    array
                </div>
                <div class="col-md-8">
                    <a href="#method_geosearch">geosearch</a>(string $key, array|string $position, array|int|float $shape, string $unit, array $options = [])
        
                                            <p><p>Search a geospacial sorted set for members in various ways.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_geosearchstore">geosearchstore</a>(string $dst, string $src, array|string $position, array|int|float $shape, string $unit, array $options = [])
        
                                            <p><p>Search a geospacial sorted set for members within a given area or range, storing the results into
a new set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_get">get</a>(string $key)
        
                                            <p><p>Retrieve a string keys value.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_getWithMeta">getWithMeta</a>(string $key)
        
                                            <p><p>Retrieve a value and metadata of key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_getAuth">getAuth</a>()
        
                                            <p><p>Get the authentication information on the connection, if any.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_getBit">getBit</a>(string $key, int $idx)
        
                                            <p><p>Get the bit at a given index in a string key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_getEx">getEx</a>(string $key, array $options = [])
        
                                            <p><p>Get the value of a key and optionally set it's expiration.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    int
                </div>
                <div class="col-md-8">
                    <a href="#method_getDBNum">getDBNum</a>()
        
                                            <p><p>Get the database number PhpRedis thinks we're connected to.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_getDel">getDel</a>(string $key)
        
                                            <p><p>Get a key from Redis and delete it in an atomic operation.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    string
                </div>
                <div class="col-md-8">
                    <a href="#method_getHost">getHost</a>()
        
                                            <p><p>Return the host or Unix socket we are connected to.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    string|null
                </div>
                <div class="col-md-8">
                    <a href="#method_getLastError">getLastError</a>()
        
                                            <p><p>Get the last error returned to us from Redis, if any.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    int
                </div>
                <div class="col-md-8">
                    <a href="#method_getMode">getMode</a>()
        
                                            <p><p>Returns whether the connection is in ATOMIC, MULTI, or PIPELINE mode</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_getOption">getOption</a>(int $option)
        
                                            <p><p>Retrieve the value of a configuration setting as set by Redis::setOption()</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    string|null
                </div>
                <div class="col-md-8">
                    <a href="#method_getPersistentID">getPersistentID</a>()
        
                                            <p><p>Get the persistent connection ID, if there is one.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    int
                </div>
                <div class="col-md-8">
                    <a href="#method_getPort">getPort</a>()
        
                                            <p><p>Get the port we are connected to.  This number will be zero if we are connected to a unix socket.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_serverName">serverName</a>()
        
                                            <p><p>Get the server name as reported by the <code>HELLO</code> response.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_serverVersion">serverVersion</a>()
        
                                            <p><p>Get the server version as reported by the <code>HELLO</code> response.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_getRange">getRange</a>(string $key, int $start, int $end)
        
                                            <p><p>Retrieve a substring of a string by index.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|array|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_lcs">lcs</a>(string $key1, string $key2, array|null $options = null)
        
                                            <p><p>Get the longest common subsequence between two string keys.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    float
                </div>
                <div class="col-md-8">
                    <a href="#method_getReadTimeout">getReadTimeout</a>()
        
                                            <p><p>Get the currently set read timeout on the connection.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_getset">getset</a>(string $key, mixed $value)
        
                                            <p><p>Sets a key and returns any previously set value, if the key already existed.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    float|false
                </div>
                <div class="col-md-8">
                    <a href="#method_getTimeout">getTimeout</a>()
        
                                            <p><p>Retrieve any set connection timeout</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    array
                </div>
                <div class="col-md-8">
                    <a href="#method_getTransferredBytes">getTransferredBytes</a>()
        
                                            <p><p>Get the number of bytes sent and received on the socket.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    void
                </div>
                <div class="col-md-8">
                    <a href="#method_clearTransferredBytes">clearTransferredBytes</a>()
        
                                            <p><p>Reset the number of bytes sent and received on the socket.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hDel">hDel</a>(string $key, string $field, string ...$other_fields)
        
                                            <p><p>Remove one or more fields from a hash.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_hExists">hExists</a>(string $key, string $field)
        
                                            <p><p>Checks whether a field exists in a hash.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_hGet">hGet</a>(string $key, string $member)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hGetAll">hGetAll</a>(string $key)
        
                                            <p><p>Read every field and value from a hash.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_hGetWithMeta">hGetWithMeta</a>(string $key, string $member)
        
                                            <p><p>Retrieve a value and metadata of hash field.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hIncrBy">hIncrBy</a>(string $key, string $field, int $value)
        
                                            <p><p>Increment a hash field's value by an integer</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|float|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hIncrByFloat">hIncrByFloat</a>(string $key, string $field, float $value)
        
                                            <p><p>Increment a hash field by a floating point value</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hKeys">hKeys</a>(string $key)
        
                                            <p><p>Retrieve all of the fields of a hash.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hLen">hLen</a>(string $key)
        
                                            <p><p>Get the number of fields in a hash.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hMget">hMget</a>(string $key, array $fields)
        
                                            <p><p>Get one or more fields from a hash.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hgetex">hgetex</a>(string $key, array $fields, string|array|null $expiry = null)
        
                                            <p><p>Get one or more fields of a hash while optionally setting expiration
information</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hsetex">hsetex</a>(string $key, array $fields, array|null $expiry = null)
        
                                            <p><p>Set one or more fields in a hash with optional expiration information.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hgetdel">hgetdel</a>(string $key, array $fields)
        
                                            <p><p>Get one or more fields and delete them</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_hMset">hMset</a>(string $key, array $fieldvals)
        
                                            <p><p>Add or update one or more hash fields and values</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hRandField">hRandField</a>(string $key, array|null $options = null)
        
                                            <p><p>Get one or more random field from a hash.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hSet">hSet</a>(string $key, mixed ...$fields_and_vals)
        
                                            <p><p>Add or update one or more hash fields and values.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_hSetNx">hSetNx</a>(string $key, string $field, mixed $value)
        
                                            <p><p>Set a hash field and value, but only if that field does not exist</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hStrLen">hStrLen</a>(string $key, string $field)
        
                                            <p><p>Get the string length of a hash field</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hVals">hVals</a>(string $key)
        
                                            <p><p>Get all of the values from a hash.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hexpire">hexpire</a>(string $key, int $ttl, array $fields, string|null $mode = NULL)
        
                                            <p><p>Set the expiration on one or more fields in a hash.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hpexpire">hpexpire</a>(string $key, int $ttl, array $fields, string|null $mode = NULL)
        
                                            <p><p>Set the expiration on one or more fields in a hash in milliseconds.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hexpireat">hexpireat</a>(string $key, int $time, array $fields, string|null $mode = NULL)
        
                                            <p><p>Set the expiration time on one or more fields of a hash.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hpexpireat">hpexpireat</a>(string $key, int $mstime, array $fields, string|null $mode = NULL)
        
                                            <p><p>Set the expiration time on one or more fields of a hash in milliseconds.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_httl">httl</a>(string $key, array $fields)
        
                                            <p><p>Get the TTL of one or more fields in a hash</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hpttl">hpttl</a>(string $key, array $fields)
        
                                            <p><p>Get the millisecond TTL of one or more fields in a hash</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hexpiretime">hexpiretime</a>(string $key, array $fields)
        
                                            <p><p>Get the expiration time of one or more fields in a hash</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hpexpiretime">hpexpiretime</a>(string $key, array $fields)
        
                                            <p><p>Get the expiration time in milliseconds of one or more fields in a hash</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_hpersist">hpersist</a>(string $key, array $fields)
        
                                            <p><p>Persist one or more hash fields</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_hscan">hscan</a>(string $key, null|int|string $iterator, string|null $pattern = null, int $count = 0)
        
                                            <p><p>Iterate over the fields and values of a hash in an incremental fashion.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_expiremember">expiremember</a>(string $key, string $field, int $ttl, string|null $unit = null)
        
                                            <p><p>Set an expiration on a key member (KeyDB only).</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_expirememberat">expirememberat</a>(string $key, string $field, int $timestamp)
        
                                            <p><p>Set an expiration on a key membert to a specific unix timestamp (KeyDB only).</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_incr">incr</a>(string $key, int $by = 1)
        
                                            <p><p>Increment a key's value, optionally by a specific amount.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_incrBy">incrBy</a>(string $key, int $value)
        
                                            <p><p>Increment a key by a specific integer value</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|float|false
                </div>
                <div class="col-md-8">
                    <a href="#method_incrByFloat">incrByFloat</a>(string $key, float $value)
        
                                            <p><p>Increment a numeric key by a floating point value.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_info">info</a>(string ...$sections)
        
                                            <p><p>Retrieve information about the connected redis-server.  If no arguments are passed to
this function, redis will return every info field.  Alternatively you may pass a specific
section you want returned (e.g. 'server', or 'memory') to receive only information pertaining
to that section.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_isConnected">isConnected</a>()
        
                                            <p><p>Check if we are currently connected to a Redis instance.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    <a href="Redis.html">Redis</a>|list&lt;string&gt;|false
                </div>
                <div class="col-md-8">
                    <a href="#method_keys">keys</a>(string $pattern)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    <a href="Redis.html">Redis</a>|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_lInsert">lInsert</a>(string $key, string $pos, mixed $pivot, mixed $value)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_lLen">lLen</a>(string $key)
        
                                            <p><p>Retrieve the length of a list.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_lMove">lMove</a>(string $src, string $dst, string $wherefrom, string $whereto)
        
                                            <p><p>Move an element from one list into another.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_blmove">blmove</a>(string $src, string $dst, string $wherefrom, string $whereto, float $timeout)
        
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool|string|array
                </div>
                <div class="col-md-8">
                    <a href="#method_lPop">lPop</a>(string $key, int $count = 0)
        
                                            <p><p>Pop one or more elements off a list.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|null|bool|int|array
                </div>
                <div class="col-md-8">
                    <a href="#method_lPos">lPos</a>(string $key, mixed $value, array|null $options = null)
        
                                            <p><p>Retrieve the index of an element in a list.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_lPush">lPush</a>(string $key, mixed ...$elements)
        
                                            <p><p>Prepend one or more elements to a list.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_rPush">rPush</a>(string $key, mixed ...$elements)
        
                                            <p><p>Append one or more elements to a list.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_lPushx">lPushx</a>(string $key, mixed $value)
        
                                            <p><p>Prepend an element to a list but only if the list exists</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_rPushx">rPushx</a>(string $key, mixed $value)
        
                                            <p><p>Append an element to a list but only if the list exists</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_lSet">lSet</a>(string $key, int $index, mixed $value)
        
                                            <p><p>Set a list element at an index to a specific value.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    int
                </div>
                <div class="col-md-8">
                    <a href="#method_lastSave">lastSave</a>()
        
                                            <p><p>Retrieve the last time Redis' database was persisted to disk.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_lindex">lindex</a>(string $key, int $index)
        
                                            <p><p>Get the element of a list by its index.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_lrange">lrange</a>(string $key, int $start, int $end)
        
                                            <p><p>Retrieve elements from a list.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_lrem">lrem</a>(string $key, mixed $value, int $count = 0)
        
                                            <p><p>Remove one or more matching elements from a list.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_ltrim">ltrim</a>(string $key, int $start, int $end)
        
                                            <p><p>Trim a list to a subrange of elements.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_mget">mget</a>(array $keys)
        
                                            <p><p>Get one or more string keys.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_migrate">migrate</a>(string $host, int $port, string|array $key, int $dstdb, int $timeout, bool $copy = false, bool $replace = false, mixed $credentials = null)
        
                                            <p><p>Proxy for the Redis MIGRATE command.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_move">move</a>(string $key, int $index)
        
                                            <p><p>Move a key to a different database on the same redis instance.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_mset">mset</a>(array $key_values)
        
                                            <p><p>Set one or more string keys.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_msetex">msetex</a>(array $key_vals, int|float|array|null $expiry = null)
        
                                            <p><p>Set one or more keys and values with optional expiry information.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_msetnx">msetnx</a>(array $key_values)
        
                                            <p><p>Set one or more string keys but only if none of the key exist.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool|Redis
                </div>
                <div class="col-md-8">
                    <a href="#method_multi">multi</a>(int $value = Redis::MULTI)
        
                                            <p><p>Begin a transaction.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_object">object</a>(string $subcommand, string $key)
        
                                            <p><p>Get encoding and other information about a key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_open">open</a>(string $host, int $port = 6379, float $timeout = 0, string|null $persistent_id = null, int $retry_interval = 0, float $read_timeout = 0, array|null $context = null)
        <small><span class="label label-danger">deprecated</span></small>
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_pconnect">pconnect</a>(string $host, int $port = 6379, float $timeout = 0, string|null $persistent_id = null, int $retry_interval = 0, float $read_timeout = 0, array|null $context = null)
        
                                            <p><p>Connects to a Redis server creating or reusing a persistent connection.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_persist">persist</a>(string $key)
        
                                            <p><p>Remove the expiration from a key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_pexpire">pexpire</a>(string $key, int $timeout, string|null $mode = null)
        
                                            <p><p>Sets an expiration in milliseconds on a given key.  If connected to Redis &gt;= 7.0.0
you can pass an optional mode argument that modifies how the command will execute.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_pexpireAt">pexpireAt</a>(string $key, int $timestamp, string|null $mode = null)
        
                                            <p><p>Set a key's expiration to a specific Unix Timestamp in milliseconds.  If connected to
Redis &gt;= 7.0.0 you can pass an optional 'mode' argument.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int
                </div>
                <div class="col-md-8">
                    <a href="#method_pfadd">pfadd</a>(string $key, array $elements)
        
                                            <p><p>Add one or more elements to a Redis HyperLogLog key</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_pfcount">pfcount</a>(array|string $key_or_keys)
        
                                            <p><p>Retrieve the cardinality of a Redis HyperLogLog key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_pfmerge">pfmerge</a>(string $dst, array $srckeys)
        
                                            <p><p>Merge one or more source HyperLogLog sets into a destination set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_ping">ping</a>(string|null $message = null)
        
                                            <p><p>PING the redis server with an optional string argument.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool|Redis
                </div>
                <div class="col-md-8">
                    <a href="#method_pipeline">pipeline</a>()
        
                                            <p><p>Enter into pipeline mode.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_popen">popen</a>(string $host, int $port = 6379, float $timeout = 0, string|null $persistent_id = null, int $retry_interval = 0, float $read_timeout = 0, array|null $context = null)
        <small><span class="label label-danger">deprecated</span></small>
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_psetex">psetex</a>(string $key, int $expire, mixed $value)
        
                                            <p><p>Set a key with an expiration time in milliseconds</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_psubscribe">psubscribe</a>(array $patterns, callable $cb)
        
                                            <p><p>Subscribe to one or more glob-style patterns</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_pttl">pttl</a>(string $key)
        
                                            <p><p>Get a keys time to live in milliseconds.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_publish">publish</a>(string $channel, string $message)
        
                                            <p><p>Publish a message to a pubsub channel</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_pubsub">pubsub</a>(string $command, mixed $arg = null)
        
                                            <p><p>Interact with the Redis PubSub subsystem.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_punsubscribe">punsubscribe</a>(array $patterns)
        
                                            <p><p>Unsubscribe from one or more channels by pattern</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|string|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_rPop">rPop</a>(string $key, int $count = 0)
        
                                            <p><p>Pop one or more elements from the end of a list.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_randomKey">randomKey</a>()
        
                                            <p><p>Return a random key from the current database</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_rawcommand">rawcommand</a>(string $command, mixed ...$args)
        
                                            <p><p>Execute any arbitrary Redis command by name.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_rename">rename</a>(string $old_name, string $new_name)
        
                                            <p><p>Unconditionally rename a key from $old_name to $new_name</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_renameNx">renameNx</a>(string $key_src, string $key_dst)
        
                                            <p><p>Renames $key_src to $key_dst but only if newkey does not exist.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_reset">reset</a>()
        
                                            <p><p>Reset the state of the connection.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_restore">restore</a>(string $key, int $ttl, string $value, array|null $options = null)
        
                                            <p><p>Restore a key by the binary payload generated by the DUMP command.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_role">role</a>()
        
                                            <p><p>Query whether the connected instance is a primary or replica</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_rpoplpush">rpoplpush</a>(string $srckey, string $dstkey)
        
                                            <p><p>Atomically pop an element off the end of a Redis LIST and push it to the beginning of
another.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sAdd">sAdd</a>(string $key, mixed $value, mixed ...$other_values)
        
                                            <p><p>Add one or more values to a Redis SET key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    int
                </div>
                <div class="col-md-8">
                    <a href="#method_sAddArray">sAddArray</a>(string $key, array $values)
        
                                            <p><p>Add one or more values to a Redis SET key.  This is an alternative to Redis::sadd() but
instead of being variadic, takes a single array of values.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sDiff">sDiff</a>(string $key, string ...$other_keys)
        
                                            <p><p>Given one or more Redis SETS, this command returns all of the members from the first
set that are not in any subsequent set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sDiffStore">sDiffStore</a>(string $dst, string $key, string ...$other_keys)
        
                                            <p><p>This method performs the same operation as SDIFF except it stores the resulting diff
values in a specified destination key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sInter">sInter</a>(array|string $key, string ...$other_keys)
        
                                            <p><p>Given one or more Redis SET keys, this command will return all of the elements that are
in every one.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sintercard">sintercard</a>(array $keys, int $limit = -1)
        
                                            <p><p>Compute the intersection of one or more sets and return the cardinality of the result.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sInterStore">sInterStore</a>(array|string $key, string ...$other_keys)
        
                                            <p><p>Perform the intersection of one or more Redis SETs, storing the result in a destination
key, rather than returning them.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sMembers">sMembers</a>(string $key)
        
                                            <p><p>Retrieve every member from a set key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sMisMember">sMisMember</a>(string $key, string $member, string ...$other_members)
        
                                            <p><p>Check if one or more values are members of a set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_sMove">sMove</a>(string $src, string $dst, mixed $value)
        
                                            <p><p>Pop a member from one set and push it onto another.  This command will create the
destination set if it does not currently exist.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sPop">sPop</a>(string $key, int $count = 0)
        
                                            <p><p>Remove one or more elements from a set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_sRandMember">sRandMember</a>(string $key, int $count = 0)
        
                                            <p><p>Retrieve one or more random members of a set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sUnion">sUnion</a>(string $key, string ...$other_keys)
        
                                            <p><p>Returns the union of one or more Redis SET keys.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sUnionStore">sUnionStore</a>(string $dst, string $key, string ...$other_keys)
        
                                            <p><p>Perform a union of one or more Redis SET keys and store the result in a new set</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_save">save</a>()
        
                                            <p><p>Persist the Redis database to disk.  This command will block the server until the save is
completed.  For a nonblocking alternative, see Redis::bgsave().</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_scan">scan</a>(null|int|string $iterator, string|null $pattern = null, int $count = 0, string|null $type = null)
        
                                            <p><p>Incrementally scan the Redis keyspace, with optional pattern and type matching.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_scard">scard</a>(string $key)
        
                                            <p><p>Retrieve the number of members in a Redis set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_script">script</a>(string $command, mixed ...$args)
        
                                            <p><p>An administrative command used to interact with LUA scripts stored on the server.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_select">select</a>(int $db)
        
                                            <p><p>Select a specific Redis database.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_set">set</a>(string $key, mixed $value, mixed $options = null)
        
                                            <p><p>Create or set a Redis STRING key to a value.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_setBit">setBit</a>(string $key, int $idx, bool $value)
        
                                            <p><p>Set a specific bit in a Redis string to zero or one</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_setRange">setRange</a>(string $key, int $index, string $value)
        
                                            <p><p>Update or append to a Redis string at a specific starting index</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_setOption">setOption</a>(int $option, mixed $value)
        
                                            <p><p>Set a configurable option on the Redis object.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    <a href="Redis.html">Redis</a>|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_setex">setex</a>(string $key, int $expire, mixed $value)
        
                                            <p><p>Set a Redis STRING key with a specific expiration in seconds.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_setnx">setnx</a>(string $key, mixed $value)
        
                                            <p><p>Set a key to a value, but only if that key does not already exist.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_sismember">sismember</a>(string $key, mixed $value)
        
                                            <p><p>Check whether a given value is the member of a Redis SET.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_slaveof">slaveof</a>(string|null $host = null, int $port = 6379)
        <small><span class="label label-danger">deprecated</span></small>
                                            <p><p>Turn a redis instance into a replica of another or promote a replica
to a primary.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_replicaof">replicaof</a>(string|null $host = null, int $port = 6379)
        
                                            <p><p>Used to turn a Redis instance into a replica of another, or to remove
replica status promoting the instance to a primary.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_touch">touch</a>(array|string $key_or_array, string ...$more_keys)
        
                                            <p><p>Update one or more keys last modified metadata.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_slowlog">slowlog</a>(string $operation, int $length = 0)
        
                                            <p><p>Interact with Redis' slowlog functionality in various ways, depending
on the value of 'operation'.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_sort">sort</a>(string $key, array|null $options = null)
        
                                            <p><p>Sort the contents of a Redis key in various ways.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_sort_ro">sort_ro</a>(string $key, array|null $options = null)
        
                                            <p><p>This is simply a read-only variant of the sort command</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    array
                </div>
                <div class="col-md-8">
                    <a href="#method_sortAsc">sortAsc</a>(string $key, string|null $pattern = null, mixed $get = null, int $offset = -1, int $count = -1, string|null $store = null)
        <small><span class="label label-danger">deprecated</span></small>
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    array
                </div>
                <div class="col-md-8">
                    <a href="#method_sortAscAlpha">sortAscAlpha</a>(string $key, string|null $pattern = null, mixed $get = null, int $offset = -1, int $count = -1, string|null $store = null)
        <small><span class="label label-danger">deprecated</span></small>
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    array
                </div>
                <div class="col-md-8">
                    <a href="#method_sortDesc">sortDesc</a>(string $key, string|null $pattern = null, mixed $get = null, int $offset = -1, int $count = -1, string|null $store = null)
        <small><span class="label label-danger">deprecated</span></small>
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    array
                </div>
                <div class="col-md-8">
                    <a href="#method_sortDescAlpha">sortDescAlpha</a>(string $key, string|null $pattern = null, mixed $get = null, int $offset = -1, int $count = -1, string|null $store = null)
        <small><span class="label label-danger">deprecated</span></small>
                                            <p class="no-description">No description</p>
                                    </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_srem">srem</a>(string $key, mixed $value, mixed ...$other_values)
        
                                            <p><p>Remove one or more values from a Redis SET key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_sscan">sscan</a>(string $key, null|int|string $iterator, string|null $pattern = null, int $count = 0)
        
                                            <p><p>Scan the members of a redis SET key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_ssubscribe">ssubscribe</a>(array $channels, callable $cb)
        
                                            <p><p>Subscribes the client to the specified shard channels.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_strlen">strlen</a>(string $key)
        
                                            <p><p>Retrieve the length of a Redis STRING key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    bool
                </div>
                <div class="col-md-8">
                    <a href="#method_subscribe">subscribe</a>(array $channels, callable $cb)
        
                                            <p><p>Subscribe to one or more Redis pubsub channels.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_sunsubscribe">sunsubscribe</a>(array $channels)
        
                                            <p><p>Unsubscribes the client from the given shard channels,
or from all of them if none is given.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_swapdb">swapdb</a>(int $src, int $dst)
        
                                            <p><p>Atomically swap two Redis databases so that all of the keys in the source database will
now be in the destination database and vice-versa.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array
                </div>
                <div class="col-md-8">
                    <a href="#method_time">time</a>()
        
                                            <p><p>Retrieve the server time from the connected Redis instance.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_ttl">ttl</a>(string $key)
        
                                            <p><p>Get the amount of time a Redis key has before it will expire, in seconds.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_type">type</a>(string $key)
        
                                            <p><p>Get the type of a given Redis key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_unlink">unlink</a>(array|string $key, string ...$other_keys)
        
                                            <p><p>Delete one or more keys from the Redis database.  Unlike this operation, the actual
deletion is asynchronous, meaning it is safe to delete large keys without fear of
Redis blocking for a long period of time.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_unsubscribe">unsubscribe</a>(array $channels)
        
                                            <p><p>Unsubscribe from one or more subscribed channels.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_unwatch">unwatch</a>()
        
                                            <p><p>Remove any previously WATCH'ed keys in a transaction.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_watch">watch</a>(array|string $key, string ...$other_keys)
        
                                            <p><p>Watch one or more keys for conditional execution of a transaction.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_wait">wait</a>(int $numreplicas, int $timeout)
        
                                            <p><p>Block the client up to the provided timeout until a certain number of replicas have confirmed
receiving them.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_xack">xack</a>(string $key, string $group, array $ids)
        
                                            <p><p>Acknowledge one or more messages that are pending (have been consumed using XREADGROUP but
not yet acknowledged by XACK.)</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_xadd">xadd</a>(string $key, string $id, array $values, int $maxlen = 0, bool $approx = false, bool $nomkstream = false)
        
                                            <p><p>Append a message to a stream.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool|array
                </div>
                <div class="col-md-8">
                    <a href="#method_xautoclaim">xautoclaim</a>(string $key, string $group, string $consumer, int $min_idle, string $start, int $count = -1, bool $justid = false)
        
                                            <p><p>This command allows a consumer to claim pending messages that have been idle for a specified period of time.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_xclaim">xclaim</a>(string $key, string $group, string $consumer, int $min_idle, array $ids, array $options)
        
                                            <p><p>This method allows a consumer to take ownership of pending stream entries, by ID.  Another
command that does much the same thing but does not require passing specific IDs is <code>Redis::xAutoClaim</code>.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_xdel">xdel</a>(string $key, array $ids)
        
                                            <p><p>Remove one or more specific IDs from a stream.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Relay|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_xdelex">xdelex</a>(string $key, array $ids, string|null $mode = null)
        
                                            <p><p>Remove one or more IDs from a stream with extended options.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_xgroup">xgroup</a>(string $operation, string|null $key = null, string|null $group = null, string|null $id_or_consumer = null, bool $mkstream = false, int $entries_read = -2)
        
                                            <p>XGROUP</p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    mixed
                </div>
                <div class="col-md-8">
                    <a href="#method_xinfo">xinfo</a>(string $operation, string|null $arg1 = null, string|null $arg2 = null, int $count = -1)
        
                                            <p><p>Retrieve information about a stream key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_xlen">xlen</a>(string $key)
        
                                            <p><p>Get the number of messages in a Redis STREAM key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_xpending">xpending</a>(string $key, string $group, string|null $start = null, string|null $end = null, int $count = -1, string|null $consumer = null)
        
                                            <p><p>Interact with stream messages that have been consumed by a consumer group but not yet
acknowledged with XACK.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_xrange">xrange</a>(string $key, string $start, string $end, int $count = -1)
        
                                            <p><p>Get a range of entries from a STREAM key.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_xread">xread</a>(array $streams, int $count = -1, int $block = -1)
        
                                            <p><p>Consume one or more unconsumed elements in one or more streams.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_xreadgroup">xreadgroup</a>(string $group, string $consumer, array $streams, int $count = 1, int $block = 1)
        
                                            <p><p>Read one or more messages using a consumer group.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_xrevrange">xrevrange</a>(string $key, string $end, string $start, int $count = -1)
        
                                            <p><p>Get a range of entries from a STREAM key in reverse chronological order.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_vadd">vadd</a>(string $key, array $values, mixed $element, array|null $options = null)
        
                                            <p><p>Add to a vector set</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_vsim">vsim</a>(string $key, mixed $member, array|null $options = null)
        
                                            <p><p>Query similarity of a vector by element or scores</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_vcard">vcard</a>(string $key)
        
                                            <p><p>Get the length of a vector set</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_vdim">vdim</a>(string $key)
        
                                            <p><p>Get the dimensions of a vector set</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_vinfo">vinfo</a>(string $key)
        
                                            <p><p>Get various bits of information about a vector set</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|bool
                </div>
                <div class="col-md-8">
                    <a href="#method_vismember">vismember</a>(string $key, mixed $member)
        
                                            <p><p>Check if an element is a member of a vectorset</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_vemb">vemb</a>(string $key, mixed $member, bool $raw = false)
        
                                            <p><p>Get the embeddings for a specific member</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_vrandmember">vrandmember</a>(string $key, int $count = 0)
        
                                            <p><p>Get one or more random members from a vector set</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_vrange">vrange</a>(string $key, string $min, string $max, int $count = -1)
        
                                            <p><p>Retreive a lexographical range of elements from a vector set</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_vrem">vrem</a>(string $key, mixed $member)
        
                                            <p><p>Remove an element from a vector set</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_vsetattr">vsetattr</a>(string $key, mixed $member, array|string $attributes)
        
                                            <p><p>Set the attributes of a vector set element</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_vgetattr">vgetattr</a>(string $key, mixed $member, bool $decode = true)
        
                                            <p><p>Get the attributes of a vector set element</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_vlinks">vlinks</a>(string $key, mixed $member, bool $withscores = false)
        
                                            <p><p>Get any adajcent values for a member of a vector set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_xtrim">xtrim</a>(string $key, string $threshold, bool $approx = false, bool $minid = false, int $limit = -1)
        
                                            <p><p>Truncate a STREAM key in various ways.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|float|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zAdd">zAdd</a>(string $key, array|float $score_or_options, mixed ...$more_scores_and_mems)
        
                                            <p><p>Add one or more elements and scores to a Redis sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zCard">zCard</a>(string $key)
        
                                            <p><p>Return the number of elements in a sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zCount">zCount</a>(string $key, int|string $start, int|string $end)
        
                                            <p><p>Count the number of members in a sorted set with scores inside a provided range.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|float|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zIncrBy">zIncrBy</a>(string $key, float $value, mixed $member)
        
                                            <p><p>Create or increment the score of a member in a Redis sorted set</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zLexCount">zLexCount</a>(string $key, string $min, string $max)
        
                                            <p><p>Count the number of elements in a sorted set whose members fall within the provided
lexographical range.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zMscore">zMscore</a>(string $key, mixed $member, mixed ...$other_members)
        
                                            <p><p>Retrieve the score of one or more members in a sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zPopMax">zPopMax</a>(string $key, int|null $count = null)
        
                                            <p><p>Pop one or more of the highest scoring elements from a sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zPopMin">zPopMin</a>(string $key, int|null $count = null)
        
                                            <p><p>Pop one or more of the lowest scoring elements from a sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRange">zRange</a>(string $key, string|int $start, string|int $end, array|bool|null $options = null)
        
                                            <p><p>Retrieve a range of elements of a sorted set between a start and end point.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRangeByLex">zRangeByLex</a>(string $key, string $min, string $max, int $offset = -1, int $count = -1)
        
                                            <p><p>Retrieve a range of elements from a sorted set by legographical range.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRangeByScore">zRangeByScore</a>(string $key, string $start, string $end, array $options = [])
        
                                            <p><p>Retrieve a range of members from a sorted set by their score.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zrangestore">zrangestore</a>(string $dstkey, string $srckey, string $start, string $end, array|bool|null $options = null)
        
                                            <p><p>This command is similar to ZRANGE except that instead of returning the values directly
it will store them in a destination key provided by the user</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|array
                </div>
                <div class="col-md-8">
                    <a href="#method_zRandMember">zRandMember</a>(string $key, array|null $options = null)
        
                                            <p><p>Retrieve one or more random members from a Redis sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRank">zRank</a>(string $key, mixed $member)
        
                                            <p><p>Get the rank of a member of a sorted set, by score.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRem">zRem</a>(mixed $key, mixed $member, mixed ...$other_members)
        
                                            <p><p>Remove one or more members from a Redis sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRemRangeByLex">zRemRangeByLex</a>(string $key, string $min, string $max)
        
                                            <p><p>Remove zero or more elements from a Redis sorted set by legographical range.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRemRangeByRank">zRemRangeByRank</a>(string $key, int $start, int $end)
        
                                            <p><p>Remove one or more members of a sorted set by their rank.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRemRangeByScore">zRemRangeByScore</a>(string $key, string $start, string $end)
        
                                            <p><p>Remove one or more members of a sorted set by their score.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRevRange">zRevRange</a>(string $key, int $start, int $end, mixed $scores = null)
        
                                            <p><p>List the members of a Redis sorted set in reverse order</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRevRangeByLex">zRevRangeByLex</a>(string $key, string $max, string $min, int $offset = -1, int $count = -1)
        
                                            <p><p>List members of a Redis sorted set within a legographical range, in reverse order.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRevRangeByScore">zRevRangeByScore</a>(string $key, string $max, string $min, array|bool $options = [])
        
                                            <p><p>List elements from a Redis sorted set by score, highest to lowest</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zRevRank">zRevRank</a>(string $key, mixed $member)
        
                                            <p><p>Retrieve a member of a sorted set by reverse rank.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|float|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zScore">zScore</a>(string $key, mixed $member)
        
                                            <p><p>Get the score of a member of a sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zdiff">zdiff</a>(array $keys, array|null $options = null)
        
                                            <p><p>Given one or more sorted set key names, return every element that is in the first
set but not any of the others.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zdiffstore">zdiffstore</a>(string $dst, array $keys)
        
                                            <p><p>Store the difference of one or more sorted sets in a destination sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zinter">zinter</a>(array $keys, array|null $weights = null, array|null $options = null)
        
                                            <p><p>Compute the intersection of one or more sorted sets and return the members</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zintercard">zintercard</a>(array $keys, int $limit = -1)
        
                                            <p><p>Similar to ZINTER but instead of returning the intersected values, this command returns the
cardinality of the intersected set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zinterstore">zinterstore</a>(string $dst, array $keys, array|null $weights = null, string|null $aggregate = null)
        
                                            <p><p>Compute the intersection of one or more sorted sets storing the result in a new sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zscan">zscan</a>(string $key, null|int|string $iterator, string|null $pattern = null, int $count = 0)
        
                                            <p><p>Scan the members of a sorted set incrementally, using a cursor</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|array|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zunion">zunion</a>(array $keys, array|null $weights = null, array|null $options = null)
        
                                            <p><p>Retrieve the union of one or more sorted sets</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|int|false
                </div>
                <div class="col-md-8">
                    <a href="#method_zunionstore">zunionstore</a>(string $dst, array $keys, array|null $weights = null, string|null $aggregate = null)
        
                                            <p><p>Perform a union on one or more Redis sets and store the result in a destination sorted set.</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
                    <div class="row">
                <div class="col-md-2 type">
                    Redis|string|false
                </div>
                <div class="col-md-8">
                    <a href="#method_digest">digest</a>(string $key)
        
                                            <p><p>Ask the server for the XXH3 digest of a given key's value</p></p>                </div>
                <div class="col-md-2"></div>
            </div>
            </div>


        <h2>Details</h2>

            <div id="method-details">
                    <div class="method-item">
                                                                                        
    <h3 id="method___construct">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L611">at line 611</a></div>
        <code class="method-signature language-php">Redis __construct(array|null $options = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Create a new Redis instance.  If passed sufficient information in the
options array it is also possible to connect to an instance at the same
time.</p></p>                <p><p><strong>NOTE</strong>:  Below is an example options array with various setting</p>
<pre><code class="language-php">$options = [
   'host'           =&gt; 'localhost',
   'port'           =&gt; 6379,
   'readTimeout'    =&gt; 2.5,
   'connectTimeout' =&gt; 2.5,
   'persistent'     =&gt; true,

   // Valid formats: NULL, ['user', 'pass'], 'pass', or ['pass']
   'auth' =&gt; ['phpredis', 'phpredis'],

   // See PHP stream options for valid SSL configuration settings.
   'ssl' =&gt; ['verify_peer' =&gt; false],

   // How quickly to retry a connection after we time out or it  closes.
   // Note that this setting is overridden by 'backoff' strategies.
   'retryInterval'  =&gt; 100,

    // Which backoff algorithm to use.  'decorrelated jitter' is
    // likely the best one for most solution, but there are many
    // to choose from:
    //     REDIS_BACKOFF_ALGORITHM_DEFAULT
    //     REDIS_BACKOFF_ALGORITHM_CONSTANT
    //     REDIS_BACKOFF_ALGORITHM_UNIFORM
    //     REDIS_BACKOFF_ALGORITHM_EXPONENTIAL
    //     REDIS_BACKOFF_ALGORITHM_FULL_JITTER
    //     REDIS_BACKOFF_ALGORITHM_EQUAL_JITTER
    //     REDIS_BACKOFF_ALGORITHM_DECORRELATED_JITTER
    // 'base', and 'cap' are in milliseconds and represent the first
    // delay redis will use when reconnecting, and the maximum delay
    // we will reach while retrying.
   'backoff' =&gt; [
       'algorithm' =&gt; Redis::BACKOFF_ALGORITHM_DECORRELATED_JITTER,
       'base'      =&gt; 500,
       'cap'       =&gt; 750,
   ]
];</code></pre>
<p>Note: If you do wish to connect via the constructor, only 'host' is
strictly required, which will cause PhpRedis to connect to that
host on Redis' default port (6379).</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td><a href="Redis.html">Redis</a></td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_connect">
Redis::connect</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/">https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new Redis([&#039;host&#039; =&gt; &#039;127.0.0.1&#039;, &#039;port&#039; =&gt; 6380]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method___destruct">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L620">at line 620</a></div>
        <code class="method-signature language-php">__destruct()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Destructor to clean up the Redis object.</p></p>                <p><p>This method will disconnect from Redis. If the connection is persistento
it will be stashed for future reuse.</p></p>        
        </div>
        <div class="tags">
            
            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method__compress">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L635">at line 635</a></div>
        <code class="method-signature language-php">string _compress(string $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Compress a value with the currently configured compressor (Redis::OPT_COMPRESSION)
exactly the same way PhpRedis does before sending data to Redis.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$value</td>
                <td><p>The value to be compressed</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>string</td>
            <td><p>The compressed result (or the original value if compression is disabled)</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_setOption">
Redis::setOption</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;_compress(&#039;payload&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method__uncompress">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L650">at line 650</a></div>
        <code class="method-signature language-php">string _uncompress(string $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Uncompress the provided argument using the compressor configured via
Redis::setOption() (Redis::OPT_COMPRESSION).</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$value</td>
                <td><p>The compressed value to uncompress.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>string</td>
            <td><p>The uncompressed result.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_setOption">
Redis::setOption</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;_uncompress($redis-&gt;_compress(&#039;payload&#039;));</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method__prefix">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L663">at line 663</a></div>
        <code class="method-signature language-php">string _prefix(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Prefix the passed argument with the currently set key prefix as set
with Redis::setOption().</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key/string to prefix</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>string</td>
            <td><p>The prefixed string</p></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;_prefix(&#039;user:42&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method__serialize">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L678">at line 678</a></div>
        <code class="method-signature language-php">string _serialize(mixed $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Serialize the provided value with the currently set serializer as set
with Redis::setOption().</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to serialize</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>string</td>
            <td><p>The serialized result</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_setOption">
Redis::setOption</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;_serialize([&#039;answer&#039; =&gt; 42]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method__unserialize">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L693">at line 693</a></div>
        <code class="method-signature language-php">mixed _unserialize(string $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Unserialize the passed argument with the currently set serializer as set
with Redis::setOption().</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$value</td>
                <td><p>The value to unserialize</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>The unserialized result</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_setOption">
Redis::setOption</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;_unserialize($redis-&gt;_serialize([&#039;answer&#039; =&gt; 42]));</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method__pack">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L708">at line 708</a></div>
        <code class="method-signature language-php">string _pack(mixed $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pack the provided value by first serializing it (if Redis::OPT_SERIALIZER is set)
and then compressing the serialized payload (if Redis::OPT_COMPRESSION is set),
mirroring exactly what PhpRedis transmits to Redis.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to pack</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>string</td>
            <td><p>The packed result having been serialized and
compressed.</p></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;_pack([&#039;count&#039; =&gt; 5]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method__digest">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L727">at line 727</a></div>
        <code class="method-signature language-php">string _digest(mixed $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Compute the XXH3 digest of a PHP value after it has been <code>_pack</code>ed, producing
the same digest Redis' DIGEST command would return for the stored value.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to compute the digest for.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>string</td>
            <td><p>The computed digest.</p></td>
        </tr>
    </table>

                </div>
            
                            <h4>Exceptions</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><a href="RedisException.html">RedisException</a></td>
                <td></td>
            </tr>
            </table>

            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;_digest([&#039;token&#039; =&gt; &#039;abc&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method__unpack">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L741">at line 741</a></div>
        <code class="method-signature language-php">mixed _unpack(string $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Unpack the provided value by first uncompressing it (if Redis::OPT_COMPRESSION
is set) and then unserializing it (if Redis::OPT_SERIALIZER is set) to recover
the original PHP value.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$value</td>
                <td><p>The value which has been serialized and compressed.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>The uncompressed and deserialized value.</p></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;_unpack($redis-&gt;_pack([&#039;count&#039; =&gt; 5]));</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_acl">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L751">at line 751</a></div>
        <code class="method-signature language-php">mixed acl(string $subcmd, string ...$args)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Execute Redis ACL subcommands.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$subcmd</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$args</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/acl/">https://redis.io/docs/latest/commands/acl/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;acl(&#039;list&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_append">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L767">at line 767</a></div>
        <code class="method-signature language-php">Redis|int|false append(string $key, mixed $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Append data to a Redis STRING key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key in question</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The data to append to the key.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new string length of the key or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/append/">https://redis.io/docs/latest/commands/append/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;set(&#039;foo&#039;, &#039;hello);
$redis-&gt;append(&#039;foo&#039;, &#039;world&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_auth">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L785">at line 785</a></div>
        <code class="method-signature language-php">Redis|bool auth(mixed $credentials)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Authenticate a Redis connection after its been established.</p></p>                <p><p>$redis-&gt;auth('password');
$redis-&gt;auth(['password']);
$redis-&gt;auth(['username', 'password']);</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>mixed</td>
                <td>$credentials</td>
                <td><p>A string password, or an array with one or two string elements.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>Whether the AUTH was successful.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/auth/">https://redis.io/docs/latest/commands/auth/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;auth(&#039;secret&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_bgSave">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L798">at line 798</a></div>
        <code class="method-signature language-php">Redis|bool bgSave()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Execute a save of the Redis database in the background.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>Whether the command was successful.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/bgsave/">https://redis.io/docs/latest/commands/bgsave/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;bgSave();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_bgrewriteaof">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L811">at line 811</a></div>
        <code class="method-signature language-php">Redis|bool bgrewriteaof()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Asynchronously rewrite Redis' append-only file</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>Whether the command was successful.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/bgrewriteaof/">https://redis.io/docs/latest/commands/bgrewriteaof/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;bgrewriteaof();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_waitaof">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L822">at line 822</a></div>
        <code class="method-signature language-php">Redis|array|false waitaof(int $numlocal, int $numreplicas, int $timeout)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>int</td>
                <td>$numlocal</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$numreplicas</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$timeout</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/waitaof/">https://redis.io/docs/latest/commands/waitaof/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;waitaof(1, 1, 5000);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_bitcount">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L844">at line 844</a></div>
        <code class="method-signature language-php">Redis|int|false bitcount(string $key, int $start = 0, int $end = -1, bool $bybit = false)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Count the number of set bits in a Redis string.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key in question (must be a string key)</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$start</td>
                <td><p>The index where Redis should start counting.  If omitted it
defaults to zero, which means the start of the string.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$end</td>
                <td><p>The index where Redis should stop counting.  If omitted it
defaults to -1, meaning the very end of the string.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$bybit</td>
                <td><p>Whether or not Redis should treat $start and $end as bit
positions, rather than bytes.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of bits set in the requested range.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/bitcount/">https://redis.io/docs/latest/commands/bitcount/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;bitcount(&#039;bitmap&#039;, 0, -1);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_bitop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L846">at line 846</a></div>
        <code class="method-signature language-php">Redis|int|false bitop(string $operation, string $deskey, string $srckey, string ...$other_keys)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$operation</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$deskey</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$srckey</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_bitpos">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L866">at line 866</a></div>
        <code class="method-signature language-php">Redis|int|false bitpos(string $key, bool $bit, int $start = 0, int $end = -1, bool $bybit = false)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Return the position of the first bit set to 0 or 1 in a string.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to check (must be a string)</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$bit</td>
                <td><p>Whether to look for an unset (0) or set (1) bit.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$start</td>
                <td><p>Where in the string to start looking.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$end</td>
                <td><p>Where in the string to stop looking.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$bybit</td>
                <td><p>If true, Redis will treat $start and $end as BIT values and not bytes, so if start
was 0 and end was 2, Redis would only search the first two bits.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The position of the first set or unset bit.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/bitpos/">https://redis.io/docs/latest/commands/bitpos/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;bitpos(&#039;bitmap&#039;, true, 0, -1);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_blPop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L886">at line 886</a></div>
        <code class="method-signature language-php">Redis|array|null|false blPop(string|array $key_or_keys, string|float|int $timeout_or_key, mixed ...$extra_args)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop an element off the beginning of a Redis list or lists, potentially blocking up to a specified
timeout.  This method may be called in two distinct ways, of which examples are provided below.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string|array</td>
                <td>$key_or_keys</td>
                <td><p>This can either be a string key or an array of one or more
keys.</p></td>
            </tr>
                    <tr>
                <td>string|float|int</td>
                <td>$timeout_or_key</td>
                <td><p>If the previous argument was a string key, this can either
be an additional key, or the timeout you wish to send to
the command.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$extra_args</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|null|false</td>
            <td><p>Can return various things depending on command and data in Redis.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/blpop/">https://redis.io/docs/latest/commands/blpop/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;blPop(&#039;list1&#039;, &#039;list2&#039;, &#039;list3&#039;, 1.5);
$relay-&gt;blPop([&#039;list1&#039;, &#039;list2&#039;, &#039;list3&#039;], 1.5);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_brPop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L899">at line 899</a></div>
        <code class="method-signature language-php">Redis|array|null|false brPop(string|array $key_or_keys, string|float|int $timeout_or_key, mixed ...$extra_args)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop an element off of the end of a Redis list or lists, potentially blocking up to a specified timeout.</p></p>                <p><p>The calling convention is identical to Redis::blPop() so see that documentation for more details.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string|array</td>
                <td>$key_or_keys</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|float|int</td>
                <td>$timeout_or_key</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$extra_args</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|null|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/brpop/">https://redis.io/docs/latest/commands/brpop/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_blPop">
Redis::blPop</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;brPop([&#039;queue:critical&#039;, &#039;queue:default&#039;], 5);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_brpoplpush">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L916">at line 916</a></div>
        <code class="method-signature language-php">Redis|string|false brpoplpush(string $src, string $dst, int|float $timeout)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop an element from the end of a Redis list, pushing it to the beginning of another Redis list,
optionally blocking up to a specified timeout.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$src</td>
                <td><p>The source list</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The destination list</p></td>
            </tr>
                    <tr>
                <td>int|float</td>
                <td>$timeout</td>
                <td><p>The number of seconds to wait.  Note that you must be connected
to Redis &gt;= 6.0.0 to send a floating point timeout.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/brpoplpush/">https://redis.io/docs/latest/commands/brpoplpush/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;brpoplpush(&#039;queue:pending&#039;, &#039;queue:processing&#039;, 5);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_bzPopMax">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L942">at line 942</a></div>
        <code class="method-signature language-php">Redis|array|false bzPopMax(string|array $key, string|int $timeout_or_key, mixed ...$extra_args)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>POP the maximum scoring element off of one or more sorted sets, blocking up to a specified
timeout if no elements are available.</p></p>                <p><p>Following are examples of the two main ways to call this method.</p>
<p><strong>NOTE</strong>:  We recommend calling this function with an array and a timeout as the other strategy
may be deprecated in future versions of PhpRedis</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string|array</td>
                <td>$key</td>
                <td><p>Either a string key or an array of one or more keys.</p></td>
            </tr>
                    <tr>
                <td>string|int</td>
                <td>$timeout_or_key</td>
                <td><p>If the previous argument was an array, this argument
must be a timeout value.  Otherwise it could also be
another key.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$extra_args</td>
                <td><p>Can consist of additional keys, until the last argument
which needs to be a timeout.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The popped elements.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/bzpopmax/">https://redis.io/docs/latest/commands/bzpopmax/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;bzPopMax(&#039;key1&#039;, &#039;key2&#039;, &#039;key3&#039;, 1.5);
$redis-&gt;bzPopMax([&#039;key1&#039;, &#039;key2&#039;, &#039;key3&#039;], 1.5);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_bzPopMin">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L957">at line 957</a></div>
        <code class="method-signature language-php">Redis|array|false bzPopMin(string|array $key, string|int $timeout_or_key, mixed ...$extra_args)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>POP the minimum scoring element off of one or more sorted sets, blocking up to a specified timeout
if no elements are available</p></p>                <p><p>This command is identical in semantics to bzPopMax so please see that method for more information.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string|array</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|int</td>
                <td>$timeout_or_key</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$extra_args</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/bzpopmin/">https://redis.io/docs/latest/commands/bzpopmin/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_bzPopMax">
Redis::bzPopMax</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;bzPopMin([&#039;scores:high&#039;, &#039;scores:low&#039;], 1.5);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_bzmpop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L982">at line 982</a></div>
        <code class="method-signature language-php">Redis|array|null|false bzmpop(float $timeout, array $keys, string $from, int $count = 1)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>POP one or more elements from one or more sorted sets, blocking up to a specified amount of time
when no elements are available.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>float</td>
                <td>$timeout</td>
                <td><p>How long to block if there are no element available</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>The sorted sets to pop from</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$from</td>
                <td><p>The string 'MIN' or 'MAX' (case insensitive) telling Redis whether you wish to
pop the lowest or highest scoring members from the set(s).</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>Pop up to how many elements.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|null|false</td>
            <td><p>This function will return an array of popped elements, or false
depending on whether any elements could be popped within the
specified timeout.</p>
<p>NOTE:  If Redis::OPT_NULL_MULTIBULK_AS_NULL is set to true via Redis::setOption(), this method will
instead return NULL when Redis doesn't pop any elements.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/bzmpop/">https://redis.io/docs/latest/commands/bzmpop/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;bzmpop(1.5, [&#039;scores:high&#039;, &#039;scores:low&#039;], &#039;MIN&#039;, 2);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zmpop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1000">at line 1000</a></div>
        <code class="method-signature language-php">Redis|array|null|false zmpop(array $keys, string $from, int $count = 1)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>POP one or more of the highest or lowest scoring elements from one or more sorted sets.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One or more sorted sets</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$from</td>
                <td><p>The string 'MIN' or 'MAX' (case insensitive) telling Redis whether you want to
pop the lowest or highest scoring elements.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>Pop up to how many elements at once.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|null|false</td>
            <td><p>An array of popped elements or false if none could be popped.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zmpop/">https://redis.io/docs/latest/commands/zmpop/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zmpop([&#039;scores:high&#039;, &#039;scores:low&#039;], &#039;MAX&#039;, 2);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_blmpop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1021">at line 1021</a></div>
        <code class="method-signature language-php">Redis|array|null|false blmpop(float $timeout, array $keys, string $from, int $count = 1)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop one or more elements from one or more Redis LISTs, blocking up to a specified timeout when
no elements are available.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>float</td>
                <td>$timeout</td>
                <td><p>The number of seconds Redis will block when no elements are available.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One or more Redis LISTs to pop from.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$from</td>
                <td><p>The string 'LEFT' or 'RIGHT' (case insensitive), telling Redis whether
to pop elements from the beginning or end of the LISTs.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>Pop up to how many elements at once.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|null|false</td>
            <td><p>One or more elements popped from the list(s) or false if all LISTs
were empty.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/blmpop/">https://redis.io/docs/latest/commands/blmpop/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;blmpop(1.5, [&#039;queue:critical&#039;, &#039;queue:default&#039;], &#039;LEFT&#039;, 2);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_lmpop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1040">at line 1040</a></div>
        <code class="method-signature language-php">Redis|array|null|false lmpop(array $keys, string $from, int $count = 1)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop one or more elements off of one or more Redis LISTs.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>An array with one or more Redis LIST key names.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$from</td>
                <td><p>The string 'LEFT' or 'RIGHT' (case insensitive), telling Redis whether to pop\
elements from the beginning or end of the LISTs.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>The maximum number of elements to pop at once.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|null|false</td>
            <td><p>One or more elements popped from the LIST(s) or false if all the LISTs
were empty.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/lmpop/">https://redis.io/docs/latest/commands/lmpop/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;lmpop([&#039;queue:critical&#039;, &#039;queue:default&#039;], &#039;RIGHT&#039;, 2);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_clearLastError">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1056">at line 1056</a></div>
        <code class="method-signature language-php">bool clearLastError()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Reset any last error on the connection to NULL</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td><p>This should always return true or throw an exception if we're not connected.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_getLastError">
Redis::getLastError</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);
$redis-&gt;set(&#039;string&#039;, &#039;this_is_a_string&#039;);
$redis-&gt;smembers(&#039;string&#039;);
var_dump($redis-&gt;getLastError());
$redis-&gt;clearLastError();
var_dump($redis-&gt;getLastError());</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_client">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1069">at line 1069</a></div>
        <code class="method-signature language-php">mixed client(string $opt, mixed ...$args)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Execute Redis CLIENT subcommands.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$opt</td>
                <td><p>The CLIENT subcommand to execute.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$args</td>
                <td><p>Additional arguments depending on the subcommand.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/client/">https://redis.io/docs/latest/commands/client/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;client(&#039;list&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_close">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1091">at line 1091</a></div>
        <code class="method-signature language-php">bool close()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Closes the connection to Redis</p></p>                <p><p>This function will close the connection whether it is persistent or not.</p></p>        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td><p>Whether the connection was successfully closed.</p></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new Redis;
$redis-&gt;pconnect(&#039;localhost&#039;, 6379);
$id1 = $redis-&gt;client(&#039;id&#039;);
$redis-&gt;close();

$redis = new Redis;
$redis-&gt;pconnect(&#039;localhost&#039;, 6379);
$id2 = $redis-&gt;client(&#039;id&#039;);

// Will print &quot;id is different&quot;
printf(&quot;ID is %s\n&quot;, $id1 == $id2 ? &#039;the same&#039; :  &#039;different&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_command">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1101">at line 1101</a></div>
        <code class="method-signature language-php">mixed command(string|null $opt = null, mixed ...$args)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Execute Redis COMMAND subcommands.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string|null</td>
                <td>$opt</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$args</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/command/">https://redis.io/docs/latest/commands/command/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;command(&#039;command&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_config">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1120">at line 1120</a></div>
        <code class="method-signature language-php">mixed config(string $operation, array|string|null $key_or_settings = null, string|null $value = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Execute the Redis CONFIG command in a variety of ways.</p></p>                <p><p>What the command does in particular depends on the <code>$operation</code> qualifier.
Operations that PhpRedis supports are: RESETSTAT, REWRITE, GET, and SET.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$operation</td>
                <td><p>The CONFIG operation to execute (e.g. GET, SET, REWRITE).</p></td>
            </tr>
                    <tr>
                <td>array|string|null</td>
                <td>$key_or_settings</td>
                <td><p>One or more keys or values.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$value</td>
                <td><p>The value if this is a <code>CONFIG SET</code> operation.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/config/">https://redis.io/docs/latest/commands/config/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;config(&#039;GET&#039;, &#039;timeout&#039;);
$redis-&gt;config(&#039;GET&#039;, [&#039;timeout&#039;, &#039;databases&#039;]);
$redis-&gt;config(&#039;SET&#039;, &#039;timeout&#039;, 30);
$redis-&gt;config(&#039;SET&#039;, [&#039;timeout&#039; =&gt; 30, &#039;loglevel&#039; =&gt; &#039;warning&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_connect">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1155">at line 1155</a></div>
        <code class="method-signature language-php">bool connect(string $host, int $port = 6379, float $timeout = 0, string|null $persistent_id = null, int $retry_interval = 0, float $read_timeout = 0, array|null $context = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Connect to a Redis server</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$host</td>
                <td><p>The Redis server hostname or IP
address.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$port</td>
                <td><p>The Redis server port.  Defaults to
6379.</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$timeout</td>
                <td><p>The connection timeout in seconds.
Defaults to 0 (no timeout).</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$persistent_id</td>
                <td><p>If set, a persistent connection will
be made with this ID.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$retry_interval</td>
                <td><p>The number of milliseconds to wait
between connection attempts.</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$read_timeout</td>
                <td><p>The read timeout in seconds.
Defaults to 0 (no timeout).</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$context</td>
                <td><p>An optional stream context to use
when connecting.
See <code>\Redis::__construct()</code> for more
details.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td><p>Whether the connection was successful.</p></td>
        </tr>
    </table>

                </div>
            
                            <h4>Exceptions</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><a href="RedisException.html">RedisException</a></td>
                <td></td>
            </tr>
            </table>

            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new \Redis;
try {
    $redis-&gt;connect(&#039;localhost&#039;, 6379, 2.5, null, 100, 2.5);
    $foo = $redis-&gt;get(&#039;foo&#039;);
    printf(&quot;foo: %s\n&quot;, $foo);
} catch (Exception $ex) {
    fprintf(STDERR, &quot;Error: {$ex-&gt;getMessage()}\n&quot;);
}</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_copy">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1191">at line 1191</a></div>
        <code class="method-signature language-php">Redis|bool copy(string $src, string $dst, array|null $options = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Make a copy of a key.</p></p>                <p><p>$redis = new Redis(['host' =&gt; 'localhost']);</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$src</td>
                <td><p>The key to copy</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The name of the new key created from the source key.</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td><p>An array with modifiers on how COPY should operate.</p>
<pre><code class="language-php">$options = [
    'REPLACE' =&gt; true|false # Whether to replace an existing key.
    'DB' =&gt; int             # Copy key to specific db.
];</code></pre></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the copy was completed and false if not.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/copy/">https://redis.io/docs/latest/commands/copy/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;pipeline()
      -&gt;select(1)
      -&gt;del(&#039;newkey&#039;)
      -&gt;select(0)
      -&gt;del(&#039;newkey&#039;)
      -&gt;mset([&#039;source1&#039; =&gt; &#039;value1&#039;, &#039;exists&#039; =&gt; &#039;old_value&#039;])
      -&gt;exec();

var_dump($redis-&gt;copy(&#039;source1&#039;, &#039;newkey&#039;));
var_dump($redis-&gt;copy(&#039;source1&#039;, &#039;newkey&#039;, [&#039;db&#039; =&gt; 1]));
var_dump($redis-&gt;copy(&#039;source1&#039;, &#039;exists&#039;));
var_dump($redis-&gt;copy(&#039;source1&#039;, &#039;exists&#039;, [&#039;REPLACE&#039; =&gt; true]));</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_dbSize">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1208">at line 1208</a></div>
        <code class="method-signature language-php">Redis|int|false dbSize()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Return the number of keys in the currently selected Redis database.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of keys or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/dbsize/">https://redis.io/docs/latest/commands/dbsize/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);
$redis-&gt;flushdb();
$redis-&gt;set(&#039;foo&#039;, &#039;bar&#039;);
var_dump($redis-&gt;dbsize());
$redis-&gt;mset([&#039;a&#039; =&gt; &#039;a&#039;, &#039;b&#039; =&gt; &#039;b&#039;, &#039;c&#039; =&gt; &#039;c&#039;, &#039;d&#039; =&gt; &#039;d&#039;]);
var_dump($redis-&gt;dbsize());</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_debug">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1222">at line 1222</a></div>
        <code class="method-signature language-php">Redis|string debug(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Execute the Redis <code>DEBUG</code> command. Note that this is disabled by default
and can be very dangerous, even allowing you to crash the server. Use
with caution</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The DEBUG subcommand to execute.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string</td>
            <td><p>The result of the DEBUG command.</p></td>
        </tr>
    </table>

                </div>
            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_decr">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1241">at line 1241</a></div>
        <code class="method-signature language-php">Redis|int|false decr(string $key, int $by = 1)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Decrement a Redis integer by 1 or a provided value.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to decrement</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$by</td>
                <td><p>How much to decrement the key.  Note that if this value is
not sent or is set to <code>1</code>, PhpRedis will actually invoke
the 'DECR' command.  If it is any value other than <code>1</code>
PhpRedis will actually send the <code>DECRBY</code> command.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new value of the key or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/decr/">https://redis.io/docs/latest/commands/decr/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/decrby/">https://redis.io/docs/latest/commands/decrby/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;decr(&#039;counter&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;decr(&#039;counter&#039;, 2);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_decrBy">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1256">at line 1256</a></div>
        <code class="method-signature language-php">Redis|int|false decrBy(string $key, int $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Decrement a redis integer by a value</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The integer key to decrement.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$value</td>
                <td><p>How much to decrement the key.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new value of the key or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/decrby/">https://redis.io/docs/latest/commands/decrby/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;decrby(&#039;counter&#039;, 1);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;decrby(&#039;counter&#039;, 2);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_del">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1276">at line 1276</a></div>
        <code class="method-signature language-php">Redis|int|false del(array|string $key, string ...$other_keys)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Delete one or more keys from Redis.</p></p>                <p><p>This method can be called in two distinct ways.  The first is to pass a single array
of keys to delete, and the second is to pass N arguments, all names of keys.  See
below for an example of both strategies.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array|string</td>
                <td>$key</td>
                <td><p>Either an array with one or more key names or a string with
the name of a key.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td><p>One or more additional keys passed in a variadic fashion.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of keys that were deleted</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/del/">https://redis.io/docs/latest/commands/del/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;del(&#039;key:0&#039;, &#039;key:1&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;del([&#039;key:2&#039;, &#039;key:3&#039;, &#039;key:4&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_delex">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1292">at line 1292</a></div>
        <code class="method-signature language-php">Redis|int|false delex(string $key, array|null $options = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Delete a key conditionally based on its value or hash digest</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to delete</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td><p>An array with options to modify how DELX works.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>Returns 1 if the key was deleted, 0 if it was not.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/delex/">https://redis.io/docs/latest/commands/delex/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;delex(&#039;session:42&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_delifeq">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1308">at line 1308</a></div>
        <code class="method-signature language-php">Redis|int|false delifeq(string $key, mixed $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Delete a key if it's equal to the specified value. This command is
specific to Valkey &gt;= 9.0</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to delete</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to compare against the key's value.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>Returns 1 if the key was deleted, 0 if it was not.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://valkey.io/commands/delifeq/">https://valkey.io/commands/delifeq/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;delifeq(&#039;session:42&#039;, &#039;token&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_delete">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1320">at line 1320</a></div>
        <code class="method-signature language-php">Redis|int|false delete(array|string $key, string ...$other_keys) deprecated</code>
    </h3>
    <div class="details">    
            <p>
                <small><span class="label label-danger">deprecated</span></small>
                            <tr>
                    <td></td>
                    <td></td>
                </tr>
                    </p>
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array|string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/del/">https://redis.io/docs/latest/commands/del/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;delete(&#039;legacy:key&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_discard">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1335">at line 1335</a></div>
        <code class="method-signature language-php">Redis|bool discard()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Discard a transaction currently in progress.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if we could discard the transaction.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/discard/">https://redis.io/docs/latest/commands/discard/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getMode();
$redis-&gt;set(&#039;foo&#039;, &#039;bar&#039;);
$redis-&gt;discard();
$redis-&gt;getMode();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_dump">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1351">at line 1351</a></div>
        <code class="method-signature language-php">Redis|string|false dump(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Dump Redis' internal binary representation of a key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to dump.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string|false</td>
            <td><p>A binary string representing the key's value.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/dump/">https://redis.io/docs/latest/commands/dump/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zadd(&#039;zset&#039;, 0, &#039;zero&#039;, 1, &#039;one&#039;, 2, &#039;two&#039;);
$binary = $redis-&gt;dump(&#039;zset&#039;);
$redis-&gt;restore(&#039;new-zset&#039;, 0, $binary);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_echo">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1364">at line 1364</a></div>
        <code class="method-signature language-php">Redis|string|false echo(string $str)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Have Redis repeat back an arbitrary string to the client.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$str</td>
                <td><p>The string to echo</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string|false</td>
            <td><p>The string sent to Redis or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/echo/">https://redis.io/docs/latest/commands/echo/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;echo(&#039;Hello, World&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_eval">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1384">at line 1384</a></div>
        <code class="method-signature language-php">mixed eval(string $script, array $args = [], int $num_keys = 0)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Execute a LUA script on the redis server.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$script</td>
                <td><p>A string containing the LUA script</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$args</td>
                <td><p>An array of arguments to pass to this script</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$num_keys</td>
                <td><p>How many of the arguments are keys.  This is needed
as redis distinguishes between key name arguments
and other data.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>LUA scripts may return arbitrary data so this method can return
strings, arrays, nested arrays, etc.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/eval/">https://redis.io/docs/latest/commands/eval/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;eval(&#039;return redis.call(&quot;set&quot;, KEYS[1], ARGV[1])&#039;, [&#039;counter&#039;, 1], 1);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_eval_ro">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1397">at line 1397</a></div>
        <code class="method-signature language-php">mixed eval_ro(string $script_sha, array $args = [], int $num_keys = 0)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>This is simply the read-only variant of eval, meaning the underlying script
may not modify data in redis.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$script_sha</td>
                <td></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$args</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$num_keys</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_eval_ro">
Redis::eval_ro</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/eval_ro/">https://redis.io/docs/latest/commands/eval_ro/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;eval_ro(&#039;return redis.call(&quot;get&quot;, KEYS[1])&#039;, [&#039;counter&#039;], 1);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_evalsha">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1420">at line 1420</a></div>
        <code class="method-signature language-php">mixed evalsha(string $sha1, array $args = [], int $num_keys = 0)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Execute a LUA script on the server but instead of sending the script, send
the SHA1 hash of the script.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$sha1</td>
                <td><p>The SHA1 hash of the lua code.  Note that the script
must already exist on the server, either having been
loaded with <code>SCRIPT LOAD</code> or having been executed directly
with <code>EVAL</code> first.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$args</td>
                <td><p>Arguments to send to the script.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$num_keys</td>
                <td><p>The number of arguments that are keys</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>Returns whatever the specific script does.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/evalsha/">https://redis.io/docs/latest/commands/evalsha/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_eval">
Redis::eval</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$sha = $redis-&gt;script(&#039;load&#039;, &#039;return redis.call(&quot;incr&quot;, KEYS[1])&#039;);
$redis-&gt;evalsha($sha, [&#039;counter&#039;], 1);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_evalsha_ro">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1434">at line 1434</a></div>
        <code class="method-signature language-php">mixed evalsha_ro(string $sha1, array $args = [], int $num_keys = 0)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>This is simply the read-only variant of evalsha, meaning the underlying script
may not modify data in redis.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$sha1</td>
                <td></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$args</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$num_keys</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_evalsha">
Redis::evalsha</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/evalsha_ro/">https://redis.io/docs/latest/commands/evalsha_ro/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$sha = $redis-&gt;script(&#039;load&#039;, &#039;return redis.call(&quot;get&quot;, KEYS[1])&#039;);
$redis-&gt;evalsha_ro($sha, [&#039;counter&#039;], 1);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_exec">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1454">at line 1454</a></div>
        <code class="method-signature language-php">Redis|array|false exec()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Execute either a MULTI or PIPELINE block and return the array of replies.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The array of pipeline'd or multi replies or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/exec/">https://redis.io/docs/latest/commands/exec/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/multi/">https://redis.io/docs/latest/commands/multi/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_pipeline">
Redis::pipeline</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_multi">
Redis::multi</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$res = $redis-&gt;multi()
-&gt;set(&#039;foo&#039;, &#039;bar&#039;)
-&gt;get(&#039;foo&#039;)
-&gt;del(&#039;list&#039;)
-&gt;rpush(&#039;list&#039;, &#039;one&#039;, &#039;two&#039;, &#039;three&#039;)
-&gt;exec();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_exists">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1470">at line 1470</a></div>
        <code class="method-signature language-php">Redis|int|bool exists(mixed $key, mixed ...$other_keys)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Test if one or more keys exist.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>mixed</td>
                <td>$key</td>
                <td><p>Either an array of keys or a string key</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$other_keys</td>
                <td><p>If the previous argument was a string, you may send any number of
additional keys to test.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|bool</td>
            <td><p>The number of keys that do exist and false on failure</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/exists/">https://redis.io/docs/latest/commands/exists/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;exists([&#039;k1&#039;, &#039;k2&#039;, &#039;k3&#039;]);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;exists(&#039;k4&#039;, &#039;k5&#039;, &#039;notakey&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_expire">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1495">at line 1495</a></div>
        <code class="method-signature language-php">Redis|bool expire(string $key, int $timeout, string|null $mode = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Sets an expiration in seconds on the key in question.  If connected to
redis-server &gt;= 7.0.0 you may send an additional &quot;mode&quot; argument which
modifies how the command will execute.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to set an expiration on.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$timeout</td>
                <td><p>The number of seconds after which key will be automatically deleted.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$mode</td>
                <td><p>A two character modifier that changes how the
command works.</p>
<pre><code>NX - Set expiry only if key has no expiry
XX - Set expiry only if key has an expiry
LT - Set expiry only when new expiry is &lt; current expiry
GT - Set expiry only when new expiry is &gt; current expiry</code></pre></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if an expiration was set and false otherwise.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/expire/">https://redis.io/docs/latest/commands/expire/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;expire(&#039;session:42&#039;, 60);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_expireAt">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1525">at line 1525</a></div>
        <code class="method-signature language-php">Redis|bool expireAt(string $key, int $timestamp, string|null $mode = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set a key to expire at an exact unix timestamp.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to set an expiration on.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$timestamp</td>
                <td><p>The unix timestamp to expire at.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$mode</td>
                <td><p>An option 'mode' that modifies how the command acts (see <a href="Redis.html#method_expire">Redis::expire</a>).</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if an expiration was set, false if not.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/expireat/">https://redis.io/docs/latest/commands/expireat/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/expire/">https://redis.io/docs/latest/commands/expire/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_expire">
Redis::expire</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;expireAt(&#039;session:42&#039;, time() + 300);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_failover">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1527">at line 1527</a></div>
        <code class="method-signature language-php">Redis|bool failover(array|null $to = null, bool $abort = false, int $timeout = 0)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array|null</td>
                <td>$to</td>
                <td></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$abort</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$timeout</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_expiretime">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1543">at line 1543</a></div>
        <code class="method-signature language-php">Redis|int|false expiretime(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the expiration of a given key as a unix timestamp</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to check.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The timestamp when the key expires, or -1 if the key has no expiry
and -2 if the key doesn't exist.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/expiretime/">https://redis.io/docs/latest/commands/expiretime/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;setEx(&#039;mykey&#039;, 60, &#039;myval&#039;);
$redis-&gt;expiretime(&#039;mykey&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_pexpiretime">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1560">at line 1560</a></div>
        <code class="method-signature language-php">Redis|int|false pexpiretime(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the expiration timestamp of a given Redis key but in milliseconds.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to check</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The expiration timestamp of this key (in milliseconds) or -1 if the
key has no expiration, and -2 if it does not exist.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/pexpiretime/">https://redis.io/docs/latest/commands/pexpiretime/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_expiretime">
Redis::expiretime</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;pexpiretime(&#039;session:42&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_fcall">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1578">at line 1578</a></div>
        <code class="method-signature language-php">mixed fcall(string $fn, array $keys = [], array $args = [])</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Invoke a function.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$fn</td>
                <td><p>The name of the function</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>Optional list of keys</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$args</td>
                <td><p>Optional list of args</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>Function may return arbitrary data so this method can return
strings, arrays, nested arrays, etc.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/fcall/">https://redis.io/docs/latest/commands/fcall/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;fcall(&#039;mylib.increment&#039;, [&#039;counter&#039;], [1]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_fcall_ro">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1596">at line 1596</a></div>
        <code class="method-signature language-php">mixed fcall_ro(string $fn, array $keys = [], array $args = [])</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>This is a read-only variant of the FCALL command that cannot execute commands that modify data.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$fn</td>
                <td><p>The name of the function</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>Optional list of keys</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$args</td>
                <td><p>Optional list of args</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>Function may return arbitrary data so this method can return
strings, arrays, nested arrays, etc.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/fcall_ro/">https://redis.io/docs/latest/commands/fcall_ro/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;fcall_ro(&#039;mylib.peek&#039;, [&#039;counter&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_flushAll">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1609">at line 1609</a></div>
        <code class="method-signature language-php">Redis|bool flushAll(bool|null $sync = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Deletes every key in all Redis databases</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>bool|null</td>
                <td>$sync</td>
                <td><p>Whether to perform the task in a blocking or non-blocking way.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/flushall/">https://redis.io/docs/latest/commands/flushall/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;flushAll(true);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_flushDB">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1622">at line 1622</a></div>
        <code class="method-signature language-php">Redis|bool flushDB(bool|null $sync = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Deletes all the keys of the currently selected database.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>bool|null</td>
                <td>$sync</td>
                <td><p>Whether to perform the task in a blocking or non-blocking way.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/flushdb/">https://redis.io/docs/latest/commands/flushdb/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;flushDB(true);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_function">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1646">at line 1646</a></div>
        <code class="method-signature language-php">Redis|bool|string|array function(string $operation, mixed ...$args)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Functions is an API for managing code to be executed on the server.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$operation</td>
                <td><p>The subcommand you intend to execute.  Valid options are as follows
'LOAD'      - Create a new library with the given library name and code.
'DELETE'    - Delete the given library.
'LIST'      - Return general information on all the libraries
'STATS'     - Return information about the current function running
'KILL'      - Kill the current running function
'FLUSH'     - Delete all the libraries
'DUMP'      - Return a serialized payload representing the current libraries
'RESTORE'   - Restore the libraries represented by the given payload</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$args</td>
                <td><p>Additional arguments</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool|string|array</td>
            <td><p>Depends on subcommand.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/function/">https://redis.io/docs/latest/commands/function/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;function(&#039;LIST&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_geoadd">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1667">at line 1667</a></div>
        <code class="method-signature language-php">Redis|int|false geoadd(string $key, float $lng, float $lat, string $member, mixed ...$other_triples_and_options)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Add one or more members to a geospacial sorted set</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to add data to.</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$lng</td>
                <td><p>The longitude of the first member</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$lat</td>
                <td><p>The latitude of the first member.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$member</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$other_triples_and_options</td>
                <td><p>You can continue to pass longitude, latitude, and member
arguments to add as many members as you wish.  Optionally, the final argument may be
a string with options for the command <a href="Redis.html">Redis</a> documentation for the options.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of added elements is returned.  If the 'CH' option is specified,
the return value is the number of members <em>changed</em>.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/geoadd/">https://redis.io/docs/latest/commands/geoadd/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;geoAdd(&#039;cities&#039;, -121.8374, 39.7284, &#039;Chico&#039;, -122.03218, 37.322, &#039;Cupertino&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;geoadd(&#039;cities&#039;, -121.837478, 39.728494, &#039;Chico&#039;, [&#039;XX&#039;, &#039;CH&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_geodist">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1690">at line 1690</a></div>
        <code class="method-signature language-php">Redis|float|false geodist(string $key, string $src, string $dst, string|null $unit = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the distance between two members of a geospacially encoded sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The Sorted set to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$src</td>
                <td><p>The first member.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The second member.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$unit</td>
                <td><p>Which unit to use when computing distance, defaulting to meters.</p>
<pre><code>M  - meters
KM - kilometers
FT - feet
MI - miles</code></pre></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|float|false</td>
            <td><p>The calculated distance in whichever units were specified or false
if one or both members did not exist.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/geodist/">https://redis.io/docs/latest/commands/geodist/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;geodist(&#039;cities&#039;, &#039;Chico&#039;, &#039;Cupertino&#039;, &#039;mi&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_geohash">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1706">at line 1706</a></div>
        <code class="method-signature language-php">Redis|array|false geohash(string $key, string $member, string ...$other_members)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve one or more GeoHash encoded strings for members of the set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to query</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$member</td>
                <td><p>The first member to request</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_members</td>
                <td><p>One or more additional members to request.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array of GeoHash encoded values.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/geohash/">https://redis.io/docs/latest/commands/geohash/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://en.wikipedia.org/wiki/Geohash">https://en.wikipedia.org/wiki/Geohash</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;geohash(&#039;cities&#039;, &#039;Chico&#039;, &#039;Cupertino&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_geopos">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1721">at line 1721</a></div>
        <code class="method-signature language-php">Redis|array|false geopos(string $key, string $member, string ...$other_members)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Return the longitude and latitude for one or more members of a geospacially encoded sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The set to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$member</td>
                <td><p>The first member to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_members</td>
                <td><p>One or more members to query.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array of longitude and latitude pairs.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/geopos/">https://redis.io/docs/latest/commands/geopos/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;geopos(&#039;cities&#039;, &#039;Seattle&#039;, &#039;New York&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_georadius">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1758">at line 1758</a></div>
        <code class="method-signature language-php">mixed georadius(string $key, float $lng, float $lat, float $radius, string $unit, array $options = [])</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve members of a geospacially sorted set that are within a certain radius of a location.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The set to query</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$lng</td>
                <td><p>The longitude of the location to query.</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$lat</td>
                <td><p>The latitude of the location to query.</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$radius</td>
                <td><p>The radius of the area to include.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$unit</td>
                <td><p>The unit of the provided radius (defaults to 'meters).
See <a href="Redis.html#method_geodist">Redis::geodist</a> for possible units.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td><p>An array of options that modifies how the command behaves.</p>
<pre><code class="language-php">$options = [
    'WITHCOORD',     # Return members and their coordinates.
    'WITHDIST',      # Return members and their distances from the center.
    'WITHHASH',      # Return members GeoHash string.
    'ASC' | 'DESC',  # The sort order of returned members

    # Limit to N returned members.  Optionally a two element array may be
    # passed as the `LIMIT` argument, and the `ANY` argument.
    'COUNT' =&gt; [&lt;int&gt;], or [&lt;int&gt;, &lt;bool&gt;]

    # Instead of returning members, store them in the specified key.
    'STORE' =&gt; &lt;string&gt;

    # Store the distances in the specified key
    'STOREDIST' =&gt; &lt;string&gt;
];</code></pre></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>This command can return various things, depending on the options passed.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/georadius/">https://redis.io/docs/latest/commands/georadius/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;georadius(&#039;cities&#039;, 47.608013, -122.335167, 1000, &#039;km&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_georadius_ro">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1770">at line 1770</a></div>
        <code class="method-signature language-php">mixed georadius_ro(string $key, float $lng, float $lat, float $radius, string $unit, array $options = [])</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>A readonly variant of <code>GEORADIUS</code> that may be executed on replicas.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$lng</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$lat</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$radius</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$unit</td>
                <td></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            Redis::georadius
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/georadius_ro/">https://redis.io/docs/latest/commands/georadius_ro/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;georadius_ro(&#039;cities&#039;, -122.335167, 47.608013, 100, &#039;km&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_georadiusbymember">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1789">at line 1789</a></div>
        <code class="method-signature language-php">mixed georadiusbymember(string $key, string $member, float $radius, string $unit, array $options = [])</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Similar to <code>GEORADIUS</code> except it uses a member as the center of the query.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$member</td>
                <td><p>The member to treat as the center of the query.</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$radius</td>
                <td><p>The radius from the member to include.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$unit</td>
                <td><p>The unit of the provided radius
See <a href="Redis.html#method_geodist">Redis::geodist</a> for possible units.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td><p>An array with various options to modify the command's behavior.
See <a href="Redis.html#method_georadius">Redis::georadius</a> for options.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>This command can return various things depending on options.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/georadiusbymember/">https://redis.io/docs/latest/commands/georadiusbymember/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;georadiusbymember(&#039;cities&#039;, &#039;Seattle&#039;, 200, &#039;mi&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_georadiusbymember_ro">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1800">at line 1800</a></div>
        <code class="method-signature language-php">mixed georadiusbymember_ro(string $key, string $member, float $radius, string $unit, array $options = [])</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>This is the read-only variant of <code>GEORADIUSBYMEMBER</code> that can be run on replicas.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$member</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$radius</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$unit</td>
                <td></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/georadiusbymember_ro/">https://redis.io/docs/latest/commands/georadiusbymember_ro/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;georadiusbymember_ro(&#039;cities&#039;, &#039;Seattle&#039;, 200, &#039;mi&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_geosearch">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1821">at line 1821</a></div>
        <code class="method-signature language-php">array geosearch(string $key, array|string $position, array|int|float $shape, string $unit, array $options = [])</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Search a geospacial sorted set for members in various ways.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The set to query.</p></td>
            </tr>
                    <tr>
                <td>array|string</td>
                <td>$position</td>
                <td><p>Either a two element array with longitude and latitude, or
a string representing a member of the set.</p></td>
            </tr>
                    <tr>
                <td>array|int|float</td>
                <td>$shape</td>
                <td><p>Either a number representine the radius of a circle to search, or
a two element array representing the width and height of a box
to search.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$unit</td>
                <td><p>The unit of our shape.  See <a href="Redis.html#method_geodist">Redis::geodist</a> for possible units.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td><p><a href="Redis.html#method_georadius">Redis::georadius</a> for options.  Note that the <code>STORE</code>
options are not allowed for this command.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>array</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/geosearch/">https://redis.io/docs/latest/commands/geosearch/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;geosearch(&#039;cities&#039;, &#039;Seattle&#039;, 50, &#039;km&#039;, [&#039;WITHDIST&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_geosearchstore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1853">at line 1853</a></div>
        <code class="method-signature language-php">Redis|array|int|false geosearchstore(string $dst, string $src, array|string $position, array|int|float $shape, string $unit, array $options = [])</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Search a geospacial sorted set for members within a given area or range, storing the results into
a new set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The destination where results will be stored.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$src</td>
                <td><p>The key to query.</p></td>
            </tr>
                    <tr>
                <td>array|string</td>
                <td>$position</td>
                <td><p>Either a two element array with longitude and latitude, or
a string representing a member of the set.</p></td>
            </tr>
                    <tr>
                <td>array|int|float</td>
                <td>$shape</td>
                <td><p>Either a number representine the radius of a circle to search, or
a two element array representing the width and height of a box
to search.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$unit</td>
                <td><p>The unit of our shape.  See <a href="Redis.html#method_geodist">Redis::geodist</a> for possible units.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td><pre><code class="language-php">$options = [
    'ASC' | 'DESC',  # The sort order of returned members
    'WITHDIST'       # Also store distances.

    # Limit to N returned members.  Optionally a two element array may be
    # passed as the `LIMIT` argument, and the `ANY` argument.
    'COUNT' =&gt; [&lt;int&gt;], or [&lt;int&gt;, &lt;bool&gt;]
];</code></pre></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|int|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/geosearchstore/">https://redis.io/docs/latest/commands/geosearchstore/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;geosearchstore(&#039;west:cities&#039;, &#039;cities&#039;, &#039;Seattle&#039;, 50, &#039;km&#039;, [&#039;DESC&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_get">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1865">at line 1865</a></div>
        <code class="method-signature language-php">mixed get(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve a string keys value.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to query</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>The keys value or false if it did not exist.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/get/">https://redis.io/docs/latest/commands/get/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;get(&#039;foo&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_getWithMeta">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1875">at line 1875</a></div>
        <code class="method-signature language-php">Redis|array|false getWithMeta(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve a value and metadata of key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to query</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getWithMeta(&#039;foo&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_getAuth">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1888">at line 1888</a></div>
        <code class="method-signature language-php">mixed getAuth()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the authentication information on the connection, if any.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>The authentication information used to authenticate the connection.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_auth">
Redis::auth</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getAuth();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_getBit">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1900">at line 1900</a></div>
        <code class="method-signature language-php">Redis|int|false getBit(string $key, int $idx)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the bit at a given index in a string key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to query.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$idx</td>
                <td><p>The Nth bit that we want to query.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/getbit/">https://redis.io/docs/latest/commands/getbit/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getbit(&#039;bitmap&#039;, 1337);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_getEx">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1923">at line 1923</a></div>
        <code class="method-signature language-php">Redis|string|bool getEx(string $key, array $options = [])</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the value of a key and optionally set it's expiration.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to query</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td><p>Options to modify how the command works.</p>
<pre><code class="language-php">$options = [
    'EX'     =&gt; &lt;seconds&gt;      # Expire in N seconds
    'PX'     =&gt; &lt;milliseconds&gt; # Expire in N milliseconds
    'EXAT'   =&gt; &lt;timestamp&gt;    # Expire at a unix timestamp (in seconds)
    'PXAT'   =&gt; &lt;mstimestamp&gt;  # Expire at a unix timestamp (in milliseconds);
    'PERSIST'                  # Remove any configured expiration on the key.
];</code></pre></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string|bool</td>
            <td><p>The key's value or false if it didn't exist.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/getex/">https://redis.io/docs/latest/commands/getex/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getEx(&#039;mykey&#039;, [&#039;EX&#039; =&gt; 60]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_getDBNum">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1939">at line 1939</a></div>
        <code class="method-signature language-php">int getDBNum()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the database number PhpRedis thinks we're connected to.</p></p>                <p><p>This value is updated internally in PhpRedis each time <a href="Redis.html#method_select">Redis::select</a> is called.</p></p>        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>int</td>
            <td><p>The database we're connected to.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_select">
Redis::select</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/select/">https://redis.io/docs/latest/commands/select/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getDBNum();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_getDel">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1951">at line 1951</a></div>
        <code class="method-signature language-php">Redis|string|bool getDel(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get a key from Redis and delete it in an atomic operation.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to get/delete.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string|bool</td>
            <td><p>The value of the key or false if it didn't exist.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/getdel/">https://redis.io/docs/latest/commands/getdel/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getdel(&#039;token:123&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_getHost">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1962">at line 1962</a></div>
        <code class="method-signature language-php">string getHost()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Return the host or Unix socket we are connected to.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>string</td>
            <td><p>The host or Unix socket.</p></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getHost();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_getLastError">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1973">at line 1973</a></div>
        <code class="method-signature language-php">string|null getLastError()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the last error returned to us from Redis, if any.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>string|null</td>
            <td><p>The error string or NULL if there is none.</p></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getLastError();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_getMode">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1984">at line 1984</a></div>
        <code class="method-signature language-php">int getMode()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Returns whether the connection is in ATOMIC, MULTI, or PIPELINE mode</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>int</td>
            <td><p>The mode we're in.</p></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getMode();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_getOption">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L1997">at line 1997</a></div>
        <code class="method-signature language-php">mixed getOption(int $option)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the value of a configuration setting as set by Redis::setOption()</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>int</td>
                <td>$option</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>The setting itself or false on failure</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_setOption">
Redis::setOption</a>
                                    </td>
                <td>for a detailed list of options and their values.</td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getOption(Redis::OPT_PREFIX);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_getPersistentID">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2008">at line 2008</a></div>
        <code class="method-signature language-php">string|null getPersistentID()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the persistent connection ID, if there is one.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>string|null</td>
            <td><p>The ID or NULL if we don't have one.</p></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getPersistentID();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_getPort">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2019">at line 2019</a></div>
        <code class="method-signature language-php">int getPort()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the port we are connected to.  This number will be zero if we are connected to a unix socket.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>int</td>
            <td><p>The port.</p></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getPort();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_serverName">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2030">at line 2030</a></div>
        <code class="method-signature language-php">string|false serverName()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the server name as reported by the <code>HELLO</code> response.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>string|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;serverName();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_serverVersion">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2041">at line 2041</a></div>
        <code class="method-signature language-php">string|false serverVersion()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the server version as reported by the <code>HELLO</code> response.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>string|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;serverVersion();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_getRange">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2058">at line 2058</a></div>
        <code class="method-signature language-php">Redis|string|false getRange(string $key, int $start, int $end)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve a substring of a string by index.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The string to query.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$start</td>
                <td><p>The zero-based starting index.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$end</td>
                <td><p>The zero-based ending index.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string|false</td>
            <td><p>The substring or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/getrange/">https://redis.io/docs/latest/commands/getrange/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;set(&#039;silly-word&#039;, &#039;Supercalifragilisticexpialidocious&#039;);
echo $redis-&gt;getRange(&#039;silly-word&#039;, 0, 4) . &quot;\n&quot;;</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_lcs">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2091">at line 2091</a></div>
        <code class="method-signature language-php">Redis|string|array|int|false lcs(string $key1, string $key2, array|null $options = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the longest common subsequence between two string keys.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key1</td>
                <td><p>The first key to check</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$key2</td>
                <td><p>The second key to check</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td><p>An optional array of modifiers for the command.</p>
<pre><code class="language-php">$options = [
    'MINMATCHLEN'  =&gt; int  # Exclude matching substrings that are less than this value

    'WITHMATCHLEN' =&gt; bool # Whether each match should also include its length.

    'LEN'                  # Return the length of the longest subsequence

    'IDX'                  # Each returned match will include the indexes where the
                           # match occurs in each string.
];</code></pre>
<p>NOTE:  'LEN' cannot be used with 'IDX'.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string|array|int|false</td>
            <td><p>Various reply types depending on options.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/lcs/">https://redis.io/docs/latest/commands/lcs/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;set(&#039;seq1&#039;, &#039;gtaggcccgcacggtctttaatgtatccctgtttaccatgccatacctgagcgcatacgc&#039;);
$redis-&gt;set(&#039;seq2&#039;, &#039;aactcggcgcgagtaccaggccaaggtcgttccagagcaaagactcgtgccccgctgagc&#039;);
echo $redis-&gt;lcs(&#039;seq1&#039;, &#039;seq2&#039;) . &quot;\n&quot;;</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_getReadTimeout">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2102">at line 2102</a></div>
        <code class="method-signature language-php">float getReadTimeout()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the currently set read timeout on the connection.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>float</td>
            <td><p>The timeout.</p></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getReadTimeout();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_getset">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2118">at line 2118</a></div>
        <code class="method-signature language-php">Redis|string|false getset(string $key, mixed $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Sets a key and returns any previously set value, if the key already existed.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to set.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to set the key to.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string|false</td>
            <td><p>The old value of the key or false if it didn't exist.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/getset/">https://redis.io/docs/latest/commands/getset/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getset(&#039;captain&#039;, &#039;Pike&#039;);
$redis-&gt;getset(&#039;captain&#039;, &#039;Kirk&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_getTimeout">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2129">at line 2129</a></div>
        <code class="method-signature language-php">float|false getTimeout()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve any set connection timeout</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>float|false</td>
            <td><p>The currently set timeout or false on failure (e.g. we aren't connected).</p></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getTimeout();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_getTransferredBytes">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2140">at line 2140</a></div>
        <code class="method-signature language-php">array getTransferredBytes()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the number of bytes sent and received on the socket.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>array</td>
            <td><p>An array in the form [$sent_bytes, $received_bytes]</p></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;getTransferredBytes();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_clearTransferredBytes">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2151">at line 2151</a></div>
        <code class="method-signature language-php">void clearTransferredBytes()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Reset the number of bytes sent and received on the socket.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>void</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;clearTransferredBytes();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hDel">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2166">at line 2166</a></div>
        <code class="method-signature language-php">Redis|int|false hDel(string $key, string $field, string ...$other_fields)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove one or more fields from a hash.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash key in question.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$field</td>
                <td><p>The first field to remove</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_fields</td>
                <td><p>One or more additional fields to remove.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of fields actually removed.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hdel/">https://redis.io/docs/latest/commands/hdel/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hDel(&#039;communication&#039;, &#039;Alice&#039;, &#039;Bob&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hExists">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2180">at line 2180</a></div>
        <code class="method-signature language-php">Redis|bool hExists(string $key, string $field)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Checks whether a field exists in a hash.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$field</td>
                <td><p>The field to check</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if it exists, false if not.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hexists/">https://redis.io/docs/latest/commands/hexists/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hExists(&#039;communication&#039;, &#039;Alice&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hGet">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2182">at line 2182</a></div>
        <code class="method-signature language-php">mixed hGet(string $key, string $member)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$member</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hGetAll">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2195">at line 2195</a></div>
        <code class="method-signature language-php">Redis|array|false hGetAll(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Read every field and value from a hash.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>All fields and values or false if the key didn't exist.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hgetall/">https://redis.io/docs/latest/commands/hgetall/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hgetall(&#039;myhash&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hGetWithMeta">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2206">at line 2206</a></div>
        <code class="method-signature language-php">mixed hGetWithMeta(string $key, string $member)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve a value and metadata of hash field.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to query</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$member</td>
                <td><p>The key to query</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hgetWithMeta(&#039;foo&#039;, &#039;field&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hIncrBy">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2224">at line 2224</a></div>
        <code class="method-signature language-php">Redis|int|false hIncrBy(string $key, string $field, int $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Increment a hash field's value by an integer</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to modify</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$field</td>
                <td><p>The field to increment</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$value</td>
                <td><p>How much to increment the value.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new value of the field.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hincrby/">https://redis.io/docs/latest/commands/hincrby/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hMSet(&#039;player:1&#039;, [&#039;name&#039; =&gt; &#039;Alice&#039;, &#039;score&#039; =&gt; 0]);
$redis-&gt;hincrby(&#039;player:1&#039;, &#039;score&#039;, 10);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hIncrByFloat">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2239">at line 2239</a></div>
        <code class="method-signature language-php">Redis|float|false hIncrByFloat(string $key, string $field, float $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Increment a hash field by a floating point value</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash with the field to increment.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$field</td>
                <td><p>The field to increment.</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$value</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|float|false</td>
            <td><p>The field value after incremented.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hincrbyfloat/">https://redis.io/docs/latest/commands/hincrbyfloat/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hincrbyfloat(&#039;numbers&#039;, &#039;tau&#039;, 2 * 3.1415926);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hKeys">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2252">at line 2252</a></div>
        <code class="method-signature language-php">Redis|array|false hKeys(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve all of the fields of a hash.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The fields in the hash or false if the hash doesn't exist.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hkeys/">https://redis.io/docs/latest/commands/hkeys/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hkeys(&#039;myhash&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hLen">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2265">at line 2265</a></div>
        <code class="method-signature language-php">Redis|int|false hLen(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the number of fields in a hash.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to check.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of fields or false if the key didn't exist.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hlen/">https://redis.io/docs/latest/commands/hlen/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hlen(&#039;myhash&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hMget">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2279">at line 2279</a></div>
        <code class="method-signature language-php">Redis|array|false hMget(string $key, array $fields)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get one or more fields from a hash.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$fields</td>
                <td><p>One or more fields to query in the hash.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The fields and values or false if the key didn't exist.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hmget/">https://redis.io/docs/latest/commands/hmget/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hMGet(&#039;player:1&#039;, [&#039;name&#039;, &#039;score&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hgetex">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2297">at line 2297</a></div>
        <code class="method-signature language-php">Redis|array|false hgetex(string $key, array $fields, string|array|null $expiry = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get one or more fields of a hash while optionally setting expiration
information</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$fields</td>
                <td><p>One or more fields to query in the hash.</p></td>
            </tr>
                    <tr>
                <td>string|array|null</td>
                <td>$expiry</td>
                <td><p>Info about the expiration</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The fields and values or false if the key didn't exist.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hgetex/">https://redis.io/docs/latest/commands/hgetex/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hgetex(&#039;profiles&#039;, [&#039;name&#039;, &#039;email&#039;], [&#039;EX&#039; =&gt; 60]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hsetex">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2314">at line 2314</a></div>
        <code class="method-signature language-php">Redis|int|false hsetex(string $key, array $fields, array|null $expiry = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set one or more fields in a hash with optional expiration information.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to create/update.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$fields</td>
                <td><p>An array with fields values.</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$expiry</td>
                <td><p>Info about the expiration</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>One if fields were set zero if not.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hsetex/">https://redis.io/docs/latest/commands/hsetex/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hsetex(&#039;profiles&#039;, [&#039;token&#039; =&gt; &#039;abc123&#039;], [&#039;EX&#039; =&gt; 60]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hgetdel">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2330">at line 2330</a></div>
        <code class="method-signature language-php">Redis|array|false hgetdel(string $key, array $fields)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get one or more fields and delete them</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash in question</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$fields</td>
                <td><p>One or more fields</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The field and values or false on failure</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hgetdel/">https://redis.io/docs/latest/commands/hgetdel/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hgetdel(&#039;profiles&#039;, [&#039;token&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hMset">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2344">at line 2344</a></div>
        <code class="method-signature language-php">Redis|bool hMset(string $key, array $fieldvals)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Add or update one or more hash fields and values</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to create/update</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$fieldvals</td>
                <td><p>An associative array with fields and their values.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the operation was successful</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hmset/">https://redis.io/docs/latest/commands/hmset/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hmset(&#039;updates&#039;, [&#039;status&#039; =&gt; &#039;starting&#039;, &#039;elapsed&#039; =&gt; 0]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hRandField">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2366">at line 2366</a></div>
        <code class="method-signature language-php">Redis|string|array|false hRandField(string $key, array|null $options = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get one or more random field from a hash.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td><p>An array of options to modify how the command behaves.</p>
<pre><code class="language-php">$options = [
    'COUNT'      =&gt; int  # An optional number of fields to return.
    'WITHVALUES' =&gt; bool # Also return the field values.
];</code></pre></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string|array|false</td>
            <td><p>One or more random fields (and possibly values).</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hrandfield/">https://redis.io/docs/latest/commands/hrandfield/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hrandfield(&#039;settings&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;hrandfield(&#039;settings&#039;, [&#039;count&#039; =&gt; 2, &#039;withvalues&#039; =&gt; true]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hSet">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2382">at line 2382</a></div>
        <code class="method-signature language-php">Redis|int|false hSet(string $key, mixed ...$fields_and_vals)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Add or update one or more hash fields and values.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to create/update.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$fields_and_vals</td>
                <td><p>Argument pairs of fields and values. Alternatively, an associative array with the
fields and their values.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of fields that were added, or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hset/">https://redis.io/docs/latest/commands/hset/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hSet(&#039;player:1&#039;, &#039;name&#039;, &#039;Kim&#039;, &#039;score&#039;, 78);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;hSet(&#039;player:1&#039;, [&#039;name&#039; =&gt; &#039;Kim&#039;, &#039;score&#039; =&gt; 78]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hSetNx">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2398">at line 2398</a></div>
        <code class="method-signature language-php">Redis|bool hSetNx(string $key, string $field, mixed $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set a hash field and value, but only if that field does not exist</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to update.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$field</td>
                <td><p>The value to set.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the field was set and false if not.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hsetnx/">https://redis.io/docs/latest/commands/hsetnx/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hsetnx(&#039;player:1&#039;, &#039;lock&#039;, &#039;enabled&#039;);
$redis-&gt;hsetnx(&#039;player:1&#039;, &#039;lock&#039;, &#039;enabled&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hStrLen">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2416">at line 2416</a></div>
        <code class="method-signature language-php">Redis|int|false hStrLen(string $key, string $field)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the string length of a hash field</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$field</td>
                <td><p>The field to query.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The string length of the field or false.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hstrlen/">https://redis.io/docs/latest/commands/hstrlen/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);
$redis-&gt;del(&#039;hash&#039;);
$redis-&gt;hmset(&#039;hash&#039;, [&#039;50bytes&#039; =&gt; str_repeat(&#039;a&#039;, 50)]);
$redis-&gt;hstrlen(&#039;hash&#039;, &#039;50bytes&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hVals">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2429">at line 2429</a></div>
        <code class="method-signature language-php">Redis|array|false hVals(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get all of the values from a hash.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The values from the hash.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hvals/">https://redis.io/docs/latest/commands/hvals/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hvals(&#039;player:1&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hexpire">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2447">at line 2447</a></div>
        <code class="method-signature language-php">Redis|array|false hexpire(string $key, int $ttl, array $fields, string|null $mode = NULL)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set the expiration on one or more fields in a hash.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to update.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$ttl</td>
                <td><p>The time to live in seconds.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$fields</td>
                <td><p>The fields to set the expiration on.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$mode</td>
                <td><p>An optional mode (NX, XX, ETC)</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hexpire/">https://redis.io/docs/latest/commands/hexpire/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hexpire(&#039;profiles&#039;, 300, [&#039;token&#039;], &#039;NX&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hpexpire">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2466">at line 2466</a></div>
        <code class="method-signature language-php">Redis|array|false hpexpire(string $key, int $ttl, array $fields, string|null $mode = NULL)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set the expiration on one or more fields in a hash in milliseconds.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to update.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$ttl</td>
                <td><p>The time to live in milliseconds.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$fields</td>
                <td><p>The fields to set the expiration on.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$mode</td>
                <td><p>An optional mode (NX, XX, ETC)</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hexpire/">https://redis.io/docs/latest/commands/hexpire/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hpexpire(&#039;profiles&#039;, 1500, [&#039;token&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hexpireat">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2485">at line 2485</a></div>
        <code class="method-signature language-php">Redis|array|false hexpireat(string $key, int $time, array $fields, string|null $mode = NULL)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set the expiration time on one or more fields of a hash.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to update.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$time</td>
                <td><p>The time to live in seconds.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$fields</td>
                <td><p>The fields to set the expiration on.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$mode</td>
                <td><p>An optional mode (NX, XX, ETC)</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hexpire/">https://redis.io/docs/latest/commands/hexpire/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hexpireat(&#039;profiles&#039;, time() + 600, [&#039;token&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hpexpireat">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2504">at line 2504</a></div>
        <code class="method-signature language-php">Redis|array|false hpexpireat(string $key, int $mstime, array $fields, string|null $mode = NULL)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set the expiration time on one or more fields of a hash in milliseconds.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to update.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$mstime</td>
                <td><p>The time to live in milliseconds.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$fields</td>
                <td><p>The fields to set the expiration on.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$mode</td>
                <td><p>An optional mode (NX, XX, ETC)</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hexpire/">https://redis.io/docs/latest/commands/hexpire/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hpexpireat(&#039;profiles&#039;, (int) (microtime(true) * 1000) + 60000, [&#039;token&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_httl">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2521">at line 2521</a></div>
        <code class="method-signature language-php">Redis|array|false httl(string $key, array $fields)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the TTL of one or more fields in a hash</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$fields</td>
                <td><p>The fields to query.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/httl/">https://redis.io/docs/latest/commands/httl/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;httl(&#039;profiles&#039;, [&#039;token&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hpttl">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2537">at line 2537</a></div>
        <code class="method-signature language-php">Redis|array|false hpttl(string $key, array $fields)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the millisecond TTL of one or more fields in a hash</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$fields</td>
                <td><p>The fields to query.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hpttl/">https://redis.io/docs/latest/commands/hpttl/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hpttl(&#039;profiles&#039;, [&#039;token&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hexpiretime">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2553">at line 2553</a></div>
        <code class="method-signature language-php">Redis|array|false hexpiretime(string $key, array $fields)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the expiration time of one or more fields in a hash</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$fields</td>
                <td><p>The fields to query.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hexpiretime/">https://redis.io/docs/latest/commands/hexpiretime/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hexpiretime(&#039;profiles&#039;, [&#039;token&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hpexpiretime">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2569">at line 2569</a></div>
        <code class="method-signature language-php">Redis|array|false hpexpiretime(string $key, array $fields)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the expiration time in milliseconds of one or more fields in a hash</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$fields</td>
                <td><p>The fields to query.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hpexpiretime/">https://redis.io/docs/latest/commands/hpexpiretime/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hpexpiretime(&#039;profiles&#039;, [&#039;token&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hpersist">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2585">at line 2585</a></div>
        <code class="method-signature language-php">Redis|array|false hpersist(string $key, array $fields)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Persist one or more hash fields</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$fields</td>
                <td><p>The fields to query.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hpersist/">https://redis.io/docs/latest/commands/hpersist/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;hpersist(&#039;profiles&#039;, [&#039;token&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_hscan">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2624">at line 2624</a></div>
        <code class="method-signature language-php">Redis|array|bool hscan(string $key, null|int|string $iterator, string|null $pattern = null, int $count = 0)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Iterate over the fields and values of a hash in an incremental fashion.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The hash to query.</p></td>
            </tr>
                    <tr>
                <td>null|int|string</td>
                <td>$iterator</td>
                <td><p>The scan iterator, which should be initialized to NULL before the first call.
This value will be updated after every call to hscan, until it reaches zero
meaning the scan is complete.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$pattern</td>
                <td><p>An optional glob-style pattern to filter fields with.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional hint to Redis about how many fields and values to return per HSCAN.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|bool</td>
            <td><p>An array with a subset of fields and values.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/hscan/">https://redis.io/docs/latest/commands/hscan/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/scan/">https://redis.io/docs/latest/commands/scan/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);

$redis-&gt;del(&#039;big-hash&#039;);

for ($i = 0; $i &lt; 1000; $i++) {
    $fields[&quot;field:$i&quot;] = &quot;value:$i&quot;;
}

$redis-&gt;hmset(&#039;big-hash&#039;, $fields);

$it = null;

do {
    // Scan the hash but limit it to fields that match &#039;*:1?3&#039;
    $fields = $redis-&gt;hscan(&#039;big-hash&#039;, $it, &#039;*:1?3&#039;);

    foreach ($fields as $field =&gt; $value) {
        echo &quot;[$field] =&gt; $value\n&quot;;
    }
} while ($it != 0);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_expiremember">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2640">at line 2640</a></div>
        <code class="method-signature language-php">Redis|int|false expiremember(string $key, string $field, int $ttl, string|null $unit = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set an expiration on a key member (KeyDB only).</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to expire</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$field</td>
                <td><p>The field to expire</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$ttl</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$unit</td>
                <td><p>The unit of the ttl (s, or ms).</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://docs.keydb.dev/docs/commands/#expiremember">https://docs.keydb.dev/docs/commands/#expiremember</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/expiremember/">https://redis.io/docs/latest/commands/expiremember/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;expiremember(&#039;profiles&#039;, &#039;token&#039;, 60);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_expirememberat">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2656">at line 2656</a></div>
        <code class="method-signature language-php">Redis|int|false expirememberat(string $key, string $field, int $timestamp)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set an expiration on a key membert to a specific unix timestamp (KeyDB only).</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to expire</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$field</td>
                <td><p>The field to expire</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$timestamp</td>
                <td><p>The unix timestamp to expire at.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://docs.keydb.dev/docs/commands/#expirememberat">https://docs.keydb.dev/docs/commands/#expirememberat</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/expirememberat/">https://redis.io/docs/latest/commands/expirememberat/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;expirememberat(&#039;profiles&#039;, &#039;token&#039;, time() + 300);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_incr">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2672">at line 2672</a></div>
        <code class="method-signature language-php">Redis|int|false incr(string $key, int $by = 1)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Increment a key's value, optionally by a specific amount.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to increment</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$by</td>
                <td><p>An optional amount to increment by.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new value of the key after incremented.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/incr/">https://redis.io/docs/latest/commands/incr/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/incrby/">https://redis.io/docs/latest/commands/incrby/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;incr(&#039;mycounter&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;incr(&#039;mycounter&#039;, 10);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_incrBy">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2689">at line 2689</a></div>
        <code class="method-signature language-php">Redis|int|false incrBy(string $key, int $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Increment a key by a specific integer value</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to increment.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$value</td>
                <td><p>The amount to increment.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/incrby/">https://redis.io/docs/latest/commands/incrby/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;set(&#039;primes&#039;, 2);
$redis-&gt;incrby(&#039;primes&#039;, 1);
$redis-&gt;incrby(&#039;primes&#039;, 2);
$redis-&gt;incrby(&#039;primes&#039;, 2);
$redis-&gt;incrby(&#039;primes&#039;, 4);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_incrByFloat">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2705">at line 2705</a></div>
        <code class="method-signature language-php">Redis|float|false incrByFloat(string $key, float $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Increment a numeric key by a floating point value.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to increment</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$value</td>
                <td><p>How much to increment (or decrement) the value.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|float|false</td>
            <td><p>The new value of the key or false if the key didn't contain a string.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/incrbyfloat/">https://redis.io/docs/latest/commands/incrbyfloat/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;incrbyfloat(&#039;tau&#039;, 3.1415926);
$redis-&gt;incrbyfloat(&#039;tau&#039;, 3.1415926);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_info">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2725">at line 2725</a></div>
        <code class="method-signature language-php">Redis|array|false info(string ...$sections)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve information about the connected redis-server.  If no arguments are passed to
this function, redis will return every info field.  Alternatively you may pass a specific
section you want returned (e.g. 'server', or 'memory') to receive only information pertaining
to that section.</p></p>                <p><p>If connected to Redis server &gt;= 7.0.0 you may pass multiple optional sections.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>...$sections</td>
                <td><p>Optional section(s) you wish Redis server to return.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/info/">https://redis.io/docs/latest/commands/info/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;info(&#039;server&#039;, &#039;stats&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_isConnected">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2736">at line 2736</a></div>
        <code class="method-signature language-php">bool isConnected()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Check if we are currently connected to a Redis instance.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td><p>True if we are, false if not</p></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;isConnected();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_keys">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2748">at line 2748</a></div>
        <code class="method-signature language-php">Redis|list&amp;lt;string&amp;gt;|false keys(string $pattern)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$pattern</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td><a href="Redis.html">Redis</a>|list&lt;string&gt;|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/keys/">https://redis.io/docs/latest/commands/keys/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;keys(&#039;session:*&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_lInsert">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2759">at line 2759</a></div>
        <code class="method-signature language-php">Redis|int|false lInsert(string $key, string $pos, mixed $pivot, mixed $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$pos</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$pivot</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td><a href="Redis.html">Redis</a>|int|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/linsert/">https://redis.io/docs/latest/commands/linsert/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;lInsert(&#039;letters&#039;, Redis::AFTER, &#039;b&#039;, &#039;beta&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_lLen">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2774">at line 2774</a></div>
        <code class="method-signature language-php">Redis|int|false lLen(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the length of a list.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The list</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of elements in the list or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/llen/">https://redis.io/docs/latest/commands/llen/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;lLen(&#039;queue&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_lMove">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2793">at line 2793</a></div>
        <code class="method-signature language-php">Redis|string|false lMove(string $src, string $dst, string $wherefrom, string $whereto)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Move an element from one list into another.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$src</td>
                <td><p>The source list.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The destination list</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$wherefrom</td>
                <td><p>Where in the source list to retrieve the element.  This can be either</p>
<ul>
<li><code>Redis::LEFT</code>, or <code>Redis::RIGHT</code>.</li>
</ul></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$whereto</td>
                <td><p>Where in the destination list to put the element.  This can be either</p>
<ul>
<li><code>Redis::LEFT</code>, or <code>Redis::RIGHT</code>.</li>
</ul></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string|false</td>
            <td><p>The element removed from the source list.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/lmove/">https://redis.io/docs/latest/commands/lmove/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;rPush(&#039;numbers&#039;, &#039;one&#039;, &#039;two&#039;, &#039;three&#039;);
$redis-&gt;lMove(&#039;numbers&#039;, &#039;odds&#039;, Redis::LEFT, Redis::LEFT);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_blmove">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2816">at line 2816</a></div>
        <code class="method-signature language-php">Redis|string|false blmove(string $src, string $dst, string $wherefrom, string $whereto, float $timeout)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$src</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$wherefrom</td>
                <td></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$whereto</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$timeout</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
            
                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_lPop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2832">at line 2832</a></div>
        <code class="method-signature language-php">Redis|bool|string|array lPop(string $key, int $count = 0)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop one or more elements off a list.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The list to pop from.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>Optional number of elements to remove.  By default one element is popped.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool|string|array</td>
            <td><p>Will return the element(s) popped from the list or false/NULL
if none was removed.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/lpop/">https://redis.io/docs/latest/commands/lpop/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;lpop(&#039;mylist&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;lpop(&#039;mylist&#039;, 4);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_lPos">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2866">at line 2866</a></div>
        <code class="method-signature language-php">Redis|null|bool|int|array lPos(string $key, mixed $value, array|null $options = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the index of an element in a list.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The list to query.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to search for.</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td><p>Options to configure how the command operates</p>
<pre><code class="language-php">$options = [
    # How many matches to return.  By default a single match is returned.
    # If count is set to zero, it means unlimited.
    'COUNT' =&gt; &lt;num-matches&gt;

    # Specify which match you want returned.  `RANK` 1 means "the first match"
    # 2 means the second, and so on.  If passed as a negative number the
    # RANK is computed right to left, so a `RANK` of -1 means "the last match".
    'RANK'  =&gt; &lt;rank&gt;

    # This argument allows you to limit how many elements Redis will search before
    # returning.  This is useful to prevent Redis searching very long lists while
    # blocking the client.
    'MAXLEN =&gt; &lt;max-len&gt;
];</code></pre></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|null|bool|int|array</td>
            <td><p>Returns one or more of the matching indexes, or null/false if none were found.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/lpos/">https://redis.io/docs/latest/commands/lpos/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;lPos(&#039;queue&#039;, &#039;job-42&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_lPush">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2880">at line 2880</a></div>
        <code class="method-signature language-php">Redis|int|false lPush(string $key, mixed ...$elements)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Prepend one or more elements to a list.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The list to prepend.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$elements</td>
                <td><p>One or more elements to prepend.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new length of the list after prepending.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/lpush/">https://redis.io/docs/latest/commands/lpush/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;lPush(&#039;mylist&#039;, &#039;cat&#039;, &#039;bear&#039;, &#039;aligator&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_rPush">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2894">at line 2894</a></div>
        <code class="method-signature language-php">Redis|int|false rPush(string $key, mixed ...$elements)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Append one or more elements to a list.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The list to append to.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$elements</td>
                <td><p>one or more elements to append.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new length of the list</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/rpush/">https://redis.io/docs/latest/commands/rpush/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;rPush(&#039;mylist&#039;, &#039;xray&#039;, &#039;yankee&#039;, &#039;zebra&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_lPushx">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2910">at line 2910</a></div>
        <code class="method-signature language-php">Redis|int|false lPushx(string $key, mixed $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Prepend an element to a list but only if the list exists</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to prepend to.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to prepend.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new length of the list.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/lpushx/">https://redis.io/docs/latest/commands/lpushx/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;lPushx(&#039;queue&#039;, &#039;job-42&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_rPushx">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2926">at line 2926</a></div>
        <code class="method-signature language-php">Redis|int|false rPushx(string $key, mixed $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Append an element to a list but only if the list exists</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to prepend to.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to prepend.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new length of the list.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/rpushx/">https://redis.io/docs/latest/commands/rpushx/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;rPushx(&#039;queue&#039;, &#039;job-99&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_lSet">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2943">at line 2943</a></div>
        <code class="method-signature language-php">Redis|bool lSet(string $key, int $index, mixed $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set a list element at an index to a specific value.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The list to modify.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$index</td>
                <td><p>The position of the element to change.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The new value.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the list was modified.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/lset/">https://redis.io/docs/latest/commands/lset/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;lSet(&#039;queue&#039;, 0, &#039;job-42&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_lastSave">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2956">at line 2956</a></div>
        <code class="method-signature language-php">int lastSave()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the last time Redis' database was persisted to disk.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>int</td>
            <td><p>The unix timestamp of the last save time</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/lastsave/">https://redis.io/docs/latest/commands/lastsave/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;lastSave();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_lindex">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2971">at line 2971</a></div>
        <code class="method-signature language-php">mixed lindex(string $key, int $index)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the element of a list by its index.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to query</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$index</td>
                <td><p>The index to check.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>The index or NULL/false if the element was not found.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/lindex/">https://redis.io/docs/latest/commands/lindex/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;lindex(&#039;queue&#039;, 0);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_lrange">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L2989">at line 2989</a></div>
        <code class="method-signature language-php">Redis|array|false lrange(string $key, int $start, int $end)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve elements from a list.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The list to query.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$start</td>
                <td><p>The beginning index to retrieve.  This number can be negative
meaning start from the end of the list.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$end</td>
                <td><p>The end index to retrieve.  This can also be negative to start
from the end of the list.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The range of elements between the indexes.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/lrange/">https://redis.io/docs/latest/commands/lrange/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;lrange(&#039;mylist&#039;, 0, -1);  // the whole list</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;lrange(&#039;mylist&#039;, -2, -1); // the last two elements in the list.</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_lrem">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3006">at line 3006</a></div>
        <code class="method-signature language-php">Redis|int|false lrem(string $key, mixed $value, int $count = 0)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove one or more matching elements from a list.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The list to truncate.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to remove.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>How many elements matching the value to remove.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of elements removed.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/lrem/">https://redis.io/docs/latest/commands/lrem/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;lrem(&#039;queue&#039;, 0, &#039;expired-job&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_ltrim">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3021">at line 3021</a></div>
        <code class="method-signature language-php">Redis|bool ltrim(string $key, int $start, int $end)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Trim a list to a subrange of elements.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The list to trim</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$start</td>
                <td><p>The starting index to keep</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$end</td>
                <td><p>The ending index to keep.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>true if the list was trimmed.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/ltrim/">https://redis.io/docs/latest/commands/ltrim/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;ltrim(&#039;mylist&#039;, 0, 3);  // Keep the first four elements</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_mget">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3033">at line 3033</a></div>
        <code class="method-signature language-php">Redis|array|false mget(array $keys)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get one or more string keys.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>The keys to retrieve</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>an array of keys with their values.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/mget/">https://redis.io/docs/latest/commands/mget/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;mget([&#039;key1&#039;, &#039;key2&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_migrate">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3061">at line 3061</a></div>
        <code class="method-signature language-php">Redis|bool migrate(string $host, int $port, string|array $key, int $dstdb, int $timeout, bool $copy = false, bool $replace = false, mixed $credentials = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Proxy for the Redis MIGRATE command.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$host</td>
                <td><p>The destination redis host.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$port</td>
                <td><p>The destination redis port.</p></td>
            </tr>
                    <tr>
                <td>string|array</td>
                <td>$key</td>
                <td><p>The key or array of keys to migrate.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$dstdb</td>
                <td><p>The destination database index.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$timeout</td>
                <td><p>The timeout for the operation in
milliseconds.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$copy</td>
                <td><p>Whether to copy the key(s) or move
them.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$replace</td>
                <td><p>Whether to replace existing keys on
the destination.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$credentials</td>
                <td><p>Optional credentials for
authenticating to the destination
server.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/migrate/">https://redis.io/docs/latest/commands/migrate/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;connect(&#039;localhost&#039;, 6379);
$redis-&gt;set(&#039;foo&#039;, &#039;6379_key&#039;);

// Move the key to localhost:9999 with a 5 second timeout
var_dump($redis-&gt;migrate(&#039;localhost&#039;, 9999, &#039;foo&#039;, 0, 5000));</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_move">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3077">at line 3077</a></div>
        <code class="method-signature language-php">Redis|bool move(string $key, int $index)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Move a key to a different database on the same redis instance.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to move</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$index</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the key was moved</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/move/">https://redis.io/docs/latest/commands/move/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;move(&#039;cart:42&#039;, 1);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_mset">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3089">at line 3089</a></div>
        <code class="method-signature language-php">Redis|bool mset(array $key_values)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set one or more string keys.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$key_values</td>
                <td><p>An array with keys and their values.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the keys could be set.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/mset/">https://redis.io/docs/latest/commands/mset/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;mSet([&#039;foo&#039; =&gt; &#039;bar&#039;, &#039;baz&#039; =&gt; &#039;bop&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_msetex">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3102">at line 3102</a></div>
        <code class="method-signature language-php">Redis|int|false msetex(array $key_vals, int|float|array|null $expiry = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set one or more keys and values with optional expiry information.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$key_vals</td>
                <td><p>An array of keys with their values.</p></td>
            </tr>
                    <tr>
                <td>int|float|array|null</td>
                <td>$expiry</td>
                <td><p>An optional array with expiry information.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>1 if all keys were set, 0 if none were.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/commands/msetex">https://redis.io/commands/msetex</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;msetex([&#039;foo&#039; =&gt; &#039;bar&#039;, &#039;baz&#039; =&gt; &#039;bop&#039;], [&#039;EX&#039; =&gt; 60]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_msetnx">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3115">at line 3115</a></div>
        <code class="method-signature language-php">Redis|bool msetnx(array $key_values)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set one or more string keys but only if none of the key exist.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$key_values</td>
                <td><p>An array of keys with their values.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the keys were set and false if not.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/msetnx/">https://redis.io/docs/latest/commands/msetnx/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;msetnx([&#039;foo&#039; =&gt; &#039;bar&#039;, &#039;baz&#039; =&gt; &#039;bop&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_multi">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3133">at line 3133</a></div>
        <code class="method-signature language-php">bool|Redis multi(int $value = Redis::MULTI)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Begin a transaction.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>int</td>
                <td>$value</td>
                <td><p>The type of transaction to start.  This can either be <code>Redis::MULTI</code> or
`Redis::PIPELINE'.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>bool|Redis</td>
            <td><p>True if the transaction could be started.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/multi/">https://redis.io/docs/latest/commands/multi/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;multi();
$redis-&gt;set(&#039;foo&#039;, &#039;bar&#039;);
$redis-&gt;get(&#039;foo&#039;);
$redis-&gt;exec();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_object">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3149">at line 3149</a></div>
        <code class="method-signature language-php">Redis|int|string|false object(string $subcommand, string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get encoding and other information about a key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$subcommand</td>
                <td><p>The subcommand to execute.  This can be either 'encoding', 'freq', or 'idle'.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to query.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|string|false</td>
            <td><p>The requested information about the key.</p></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;del(&#039;list1&#039;);
$redis-&gt;rPush(&#039;list1&#039;, &#039;a&#039;, &#039;b&#039;, &#039;c&#039;);
echo $redis-&gt;object(&#039;encoding&#039;, &#039;list1&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_open">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3159">at line 3159</a></div>
        <code class="method-signature language-php">bool open(string $host, int $port = 6379, float $timeout = 0, string|null $persistent_id = null, int $retry_interval = 0, float $read_timeout = 0, array|null $context = null) deprecated</code>
    </h3>
    <div class="details">    
            <p>
                <small><span class="label label-danger">deprecated</span></small>
                            <tr>
                    <td></td>
                    <td></td>
                </tr>
                    </p>
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$host</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$port</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$timeout</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$persistent_id</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$retry_interval</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$read_timeout</td>
                <td></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$context</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;open(&#039;127.0.0.1&#039;, 6379);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_pconnect">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3184">at line 3184</a></div>
        <code class="method-signature language-php">bool pconnect(string $host, int $port = 6379, float $timeout = 0, string|null $persistent_id = null, int $retry_interval = 0, float $read_timeout = 0, array|null $context = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Connects to a Redis server creating or reusing a persistent connection.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$host</td>
                <td><p>The Redis server hostname.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$port</td>
                <td><p>The Redis server port.</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$timeout</td>
                <td><p>Connection timeout in seconds.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$persistent_id</td>
                <td><p>An optional persistent ID to use for the connection.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$retry_interval</td>
                <td><p>The number of microseconds to wait before retrying a connection.</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$read_timeout</td>
                <td><p>Read timeout in seconds.</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$context</td>
                <td><p>An optional stream context array.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td><p>True if the connection was successful.</p></td>
        </tr>
    </table>

                </div>
            
                            <h4>Exceptions</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><a href="RedisException.html">RedisException</a></td>
                <td></td>
            </tr>
            </table>

            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">try {
    $redis = new Redis();
    $redis-&gt;pconnect(&#039;localhost&#039;, 6379);
} catch (Exception $ex) {
   echo &quot;Could not connect to Redis: &quot;, $ex-&gt;getMessage(), &quot;\n&quot;;
}</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_persist">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3199">at line 3199</a></div>
        <code class="method-signature language-php">Redis|bool persist(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove the expiration from a key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to operate against.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if a timeout was removed and false if it was not or the key didn't exist.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/persist/">https://redis.io/docs/latest/commands/persist/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;persist(&#039;session:42&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_pexpire">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3219">at line 3219</a></div>
        <code class="method-signature language-php">bool pexpire(string $key, int $timeout, string|null $mode = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Sets an expiration in milliseconds on a given key.  If connected to Redis &gt;= 7.0.0
you can pass an optional mode argument that modifies how the command will execute.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to set an expiration on.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$timeout</td>
                <td><p>The number of milliseconds after which key will be automatically deleted.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$mode</td>
                <td><p>A two character modifier that changes how the
command works.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td><p>True if an expiry was set on the key, and false otherwise.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_expire">
Redis::expire</a>
                                    </td>
                <td>for a description of the mode argument.</td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/pexpire/">https://redis.io/docs/latest/commands/pexpire/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;pexpire(&#039;session:42&#039;, 5000);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_pexpireAt">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3239">at line 3239</a></div>
        <code class="method-signature language-php">Redis|bool pexpireAt(string $key, int $timestamp, string|null $mode = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set a key's expiration to a specific Unix Timestamp in milliseconds.  If connected to
Redis &gt;= 7.0.0 you can pass an optional 'mode' argument.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$timestamp</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$mode</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_expire">
Redis::expire</a>
                                    </td>
                <td>For a description of the mode argument.</td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/pexpireat/">https://redis.io/docs/latest/commands/pexpireat/</a>
                                    </td>
                <td>@param string      $key  The key to set an expiration on.
@param int         $timestamp The unix timestamp to expire at.
@param string|null $mode A two character modifier that changes how the
                     command works.

@return Redis|bool   True if an expiration was set on the key, false otherwise.</td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;pexpireAt(&#039;session:42&#039;, (int) (microtime(true) * 1000) + 60000);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_pfadd">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3256">at line 3256</a></div>
        <code class="method-signature language-php">Redis|int pfadd(string $key, array $elements)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Add one or more elements to a Redis HyperLogLog key</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key in question.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$elements</td>
                <td><p>One or more elements to add.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int</td>
            <td><p>Returns 1 if the set was altered, and zero if not.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/pfadd/">https://redis.io/docs/latest/commands/pfadd/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;pfadd(&#039;visitors&#039;, [&#039;alice&#039;, &#039;bob&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_pfcount">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3271">at line 3271</a></div>
        <code class="method-signature language-php">Redis|int|false pfcount(array|string $key_or_keys)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the cardinality of a Redis HyperLogLog key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array|string</td>
                <td>$key_or_keys</td>
                <td><p>Either one key or an array of keys</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The estimated cardinality of the set.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/pfcount/">https://redis.io/docs/latest/commands/pfcount/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;pfcount([&#039;visitors:today&#039;, &#039;visitors:yesterday&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_pfmerge">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3287">at line 3287</a></div>
        <code class="method-signature language-php">Redis|bool pfmerge(string $dst, array $srckeys)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Merge one or more source HyperLogLog sets into a destination set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The destination key.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$srckeys</td>
                <td><p>One or more source keys.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>Always returns true.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/pfmerge/">https://redis.io/docs/latest/commands/pfmerge/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;pfmerge(&#039;visitors:all&#039;, [&#039;visitors:today&#039;, &#039;visitors:yesterday&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_ping">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3302">at line 3302</a></div>
        <code class="method-signature language-php">Redis|string|bool ping(string|null $message = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>PING the redis server with an optional string argument.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string|null</td>
                <td>$message</td>
                <td><p>An optional string message that Redis will reply with, if passed.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string|bool</td>
            <td><p>If passed no message, this command will simply return <code>true</code>.
If a message is passed, it will return the message.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/ping/">https://redis.io/docs/latest/commands/ping/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;ping();</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;ping(&#039;beep boop&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_pipeline">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3322">at line 3322</a></div>
        <code class="method-signature language-php">bool|Redis pipeline()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Enter into pipeline mode.</p></p>                <p><p>Pipeline mode is the highest performance way to send many commands to Redis
as they are aggregated into one stream of commands and then all sent at once
when the user calls Redis::exec().</p>
<p>NOTE:  That this is shorthand for Redis::multi(Redis::PIPELINE)</p></p>        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>bool|Redis</td>
            <td><p>The redis object is returned, to facilitate method chaining.</p></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;pipeline()
-&gt;set(&#039;foo&#039;, &#039;bar&#039;)
-&gt;del(&#039;mylist&#039;)
-&gt;rpush(&#039;mylist&#039;, &#039;a&#039;, &#039;b&#039;, &#039;c&#039;)
-&gt;exec();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_popen">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3332">at line 3332</a></div>
        <code class="method-signature language-php">bool popen(string $host, int $port = 6379, float $timeout = 0, string|null $persistent_id = null, int $retry_interval = 0, float $read_timeout = 0, array|null $context = null) deprecated</code>
    </h3>
    <div class="details">    
            <p>
                <small><span class="label label-danger">deprecated</span></small>
                            <tr>
                    <td></td>
                    <td></td>
                </tr>
                    </p>
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$host</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$port</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$timeout</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$persistent_id</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$retry_interval</td>
                <td></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$read_timeout</td>
                <td></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$context</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;popen(&#039;127.0.0.1&#039;, 6379, 0.0, &#039;cache&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_psetex">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3347">at line 3347</a></div>
        <code class="method-signature language-php">Redis|bool psetex(string $key, int $expire, mixed $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set a key with an expiration time in milliseconds</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to set</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$expire</td>
                <td><p>The TTL to set, in milliseconds.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to set the key to.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the key could be set.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/psetex/">https://redis.io/docs/latest/commands/psetex/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;psetex(&#039;mykey&#039;, 1000, &#039;myval&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_psubscribe">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3369">at line 3369</a></div>
        <code class="method-signature language-php">bool psubscribe(array $patterns, callable $cb)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Subscribe to one or more glob-style patterns</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$patterns</td>
                <td><p>One or more patterns to subscribe to.</p></td>
            </tr>
                    <tr>
                <td>callable</td>
                <td>$cb</td>
                <td><p>A callback with the following prototype:</p>
<pre><code class="language-php">function ($redis, $channel, $message) { }</code></pre></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td><p>True if we were subscribed.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/psubscribe/">https://redis.io/docs/latest/commands/psubscribe/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;psubscribe([&#039;user:*&#039;], function (Redis $client, string $pattern, string $channel, string $message): void {
    printf(&#039;[%s] %s&#039; . PHP_EOL, $channel, $message);
});</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_pttl">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3386">at line 3386</a></div>
        <code class="method-signature language-php">Redis|int|false pttl(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get a keys time to live in milliseconds.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to check.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The key's TTL or one of two special values if it has none.</p>
<pre><code>-1 - The key has no TTL.
-2 - The key did not exist.</code></pre></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/pttl/">https://redis.io/docs/latest/commands/pttl/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;pttl(&#039;ttl-key&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_publish">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3402">at line 3402</a></div>
        <code class="method-signature language-php">Redis|int|false publish(string $channel, string $message)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Publish a message to a pubsub channel</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$channel</td>
                <td><p>The channel to publish to.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$message</td>
                <td><p>The message itself.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of subscribed clients to the given channel.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/publish/">https://redis.io/docs/latest/commands/publish/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;publish(&#039;updates&#039;, &#039;build complete&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_pubsub">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3416">at line 3416</a></div>
        <code class="method-signature language-php">mixed pubsub(string $command, mixed $arg = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Interact with the Redis PubSub subsystem.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$command</td>
                <td><p>The PubSub command to execute.  This can be one of:</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$arg</td>
                <td><p>An optional argument to the command.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>Can return any number of things depending on the command executed.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/pubsub/">https://redis.io/docs/latest/commands/pubsub/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;pubsub(&#039;channels&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_punsubscribe">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3433">at line 3433</a></div>
        <code class="method-signature language-php">Redis|array|bool punsubscribe(array $patterns)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Unsubscribe from one or more channels by pattern</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$patterns</td>
                <td><p>One or more glob-style patterns of channel names.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|bool</td>
            <td><p>The array of subscribed patterns or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/punsubscribe/">https://redis.io/docs/latest/commands/punsubscribe/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/subscribe/">https://redis.io/docs/latest/commands/subscribe/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_subscribe">
Redis::subscribe</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;punsubscribe([&#039;user:*&#039;, &#039;room:*&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_rPop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3449">at line 3449</a></div>
        <code class="method-signature language-php">Redis|array|string|bool rPop(string $key, int $count = 0)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop one or more elements from the end of a list.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>A redis LIST key name.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>The maximum number of elements to pop at once.
NOTE:  The <code>count</code> argument requires Redis &gt;= 6.2.0</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|string|bool</td>
            <td><p>One or more popped elements or false if all were empty.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/rpop/">https://redis.io/docs/latest/commands/rpop/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;rPop(&#039;mylist&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;rPop(&#039;mylist&#039;, 4);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_randomKey">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3462">at line 3462</a></div>
        <code class="method-signature language-php">Redis|string|false randomKey()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Return a random key from the current database</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string|false</td>
            <td><p>A random key name or false if no keys exist</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/randomkey/">https://redis.io/docs/latest/commands/randomkey/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;randomKey();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_rawcommand">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3476">at line 3476</a></div>
        <code class="method-signature language-php">mixed rawcommand(string $command, mixed ...$args)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Execute any arbitrary Redis command by name.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$command</td>
                <td><p>The command to execute</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$args</td>
                <td><p>One or more arguments to pass to the command.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>Can return any number of things depending on command executed.</p></td>
        </tr>
    </table>

                </div>
            
            
            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;rawCommand(&#039;del&#039;, &#039;mystring&#039;, &#039;mylist&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;rawCommand(&#039;set&#039;, &#039;mystring&#039;, &#039;myvalue&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;rawCommand(&#039;rpush&#039;, &#039;mylist&#039;, &#039;one&#039;, &#039;two&#039;, &#039;three&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_rename">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3492">at line 3492</a></div>
        <code class="method-signature language-php">Redis|bool rename(string $old_name, string $new_name)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Unconditionally rename a key from $old_name to $new_name</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$old_name</td>
                <td><p>The original name of the key</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$new_name</td>
                <td><p>The new name for the key</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the key was renamed or false if not.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/rename/">https://redis.io/docs/latest/commands/rename/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;rename(&#039;config:pending&#039;, &#039;config:active&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_renameNx">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3511">at line 3511</a></div>
        <code class="method-signature language-php">Redis|bool renameNx(string $key_src, string $key_dst)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Renames $key_src to $key_dst but only if newkey does not exist.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key_src</td>
                <td><p>The source key name</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$key_dst</td>
                <td><p>The destination key name.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the key was renamed, false if not.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/renamenx/">https://redis.io/docs/latest/commands/renamenx/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;set(&#039;src&#039;, &#039;src_key&#039;);
$redis-&gt;set(&#039;existing-dst&#039;, &#039;i_exist&#039;);

$redis-&gt;renamenx(&#039;src&#039;, &#039;dst&#039;);
$redis-&gt;renamenx(&#039;dst&#039;, &#039;existing-dst&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_reset">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3524">at line 3524</a></div>
        <code class="method-signature language-php">Redis|bool reset()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Reset the state of the connection.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>Should always return true unless there is an error.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/reset/">https://redis.io/docs/latest/commands/reset/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;reset();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_restore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3562">at line 3562</a></div>
        <code class="method-signature language-php">Redis|bool restore(string $key, int $ttl, string $value, array|null $options = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Restore a key by the binary payload generated by the DUMP command.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The name of the key you wish to create.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$ttl</td>
                <td><p>What Redis should set the key's TTL (in milliseconds) to once it is created.
Zero means no TTL at all.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$value</td>
                <td><p>The serialized binary value of the string (generated by DUMP).</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td><p>An array of additional options that modifies how the command operates.</p>
<pre><code class="language-php">$options = [
    'ABSTTL'          # If this is present, the `$ttl` provided by the user should
                      # be an absolute timestamp, in milliseconds()

    'REPLACE'         # This flag instructs Redis to store the key even if a key with
                      # that name already exists.

    'IDLETIME' =&gt; int # Tells Redis to set the keys internal 'idletime' value to a
                      # specific number (see the Redis command OBJECT for more info).
    'FREQ'     =&gt; int # Tells Redis to set the keys internal 'FREQ' value to a specific
                      # number (this relates to Redis' LFU eviction algorithm).
];</code></pre></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the key was stored, false if not.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/restore/">https://redis.io/docs/latest/commands/restore/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/dump/">https://redis.io/docs/latest/commands/dump/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_dump">
Redis::dump</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sAdd(&#039;captains&#039;, &#039;Janeway&#039;, &#039;Picard&#039;, &#039;Sisko&#039;, &#039;Kirk&#039;, &#039;Archer&#039;);
$serialized = $redis-&gt;dump(&#039;captains&#039;);

$redis-&gt;restore(&#039;captains-backup&#039;, 0, $serialized);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_role">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3576">at line 3576</a></div>
        <code class="method-signature language-php">mixed role()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Query whether the connected instance is a primary or replica</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>Will return an array with the role of the connected instance unless there is
an error.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/role/">https://redis.io/docs/latest/commands/role/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;role();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_rpoplpush">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3598">at line 3598</a></div>
        <code class="method-signature language-php">Redis|string|false rpoplpush(string $srckey, string $dstkey)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Atomically pop an element off the end of a Redis LIST and push it to the beginning of
another.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$srckey</td>
                <td><p>The source key to pop from.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$dstkey</td>
                <td><p>The destination key to push to.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string|false</td>
            <td><p>The popped element or false if the source key was empty.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/rpoplpush/">https://redis.io/docs/latest/commands/rpoplpush/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;pipeline()
      -&gt;del(&#039;list1&#039;, &#039;list2&#039;)
      -&gt;rpush(&#039;list1&#039;, &#039;list1-1&#039;, &#039;list1-2&#039;)
      -&gt;rpush(&#039;list2&#039;, &#039;list2-1&#039;, &#039;list2-2&#039;)
      -&gt;exec();

$redis-&gt;rpoplpush(&#039;list2&#039;, &#039;list1&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sAdd">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3617">at line 3617</a></div>
        <code class="method-signature language-php">Redis|int|false sAdd(string $key, mixed $value, mixed ...$other_values)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Add one or more values to a Redis SET key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key name</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>A value to add to the set.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$other_values</td>
                <td><p>One or more additional values to add</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of values added to the set.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/sadd/">https://redis.io/docs/latest/commands/sadd/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;del(&#039;myset&#039;);

$redis-&gt;sadd(&#039;myset&#039;, &#039;foo&#039;, &#039;bar&#039;, &#039;baz&#039;);
$redis-&gt;sadd(&#039;myset&#039;, &#039;foo&#039;, &#039;new&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sAddArray">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3637">at line 3637</a></div>
        <code class="method-signature language-php">int sAddArray(string $key, array $values)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Add one or more values to a Redis SET key.  This is an alternative to Redis::sadd() but
instead of being variadic, takes a single array of values.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The set to add values to.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$values</td>
                <td><p>One or more members to add to the set.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>int</td>
            <td><p>The number of members added to the set.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/sadd/">https://redis.io/docs/latest/commands/sadd/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            \Redis::sadd()
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;del(&#039;myset&#039;);

$redis-&gt;sAddArray(&#039;myset&#039;, [&#039;foo&#039;, &#039;bar&#039;, &#039;baz&#039;]);
$redis-&gt;sAddArray(&#039;myset&#039;, [&#039;foo&#039;, &#039;new&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sDiff">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3661">at line 3661</a></div>
        <code class="method-signature language-php">Redis|array|false sDiff(string $key, string ...$other_keys)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Given one or more Redis SETS, this command returns all of the members from the first
set that are not in any subsequent set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The first set</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td><p>One or more additional sets</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>Returns the elements from keys 2..N that don't exist in the
first sorted set, or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/sdiff/">https://redis.io/docs/latest/commands/sdiff/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;pipeline()
      -&gt;del(&#039;set1&#039;, &#039;set2&#039;, &#039;set3&#039;)
      -&gt;sadd(&#039;set1&#039;, &#039;apple&#039;, &#039;banana&#039;, &#039;carrot&#039;, &#039;date&#039;)
      -&gt;sadd(&#039;set2&#039;, &#039;carrot&#039;)
      -&gt;sadd(&#039;set3&#039;, &#039;apple&#039;, &#039;carrot&#039;, &#039;eggplant&#039;)
      -&gt;exec();

$redis-&gt;sdiff(&#039;set1&#039;, &#039;set2&#039;, &#039;set3&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sDiffStore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3680">at line 3680</a></div>
        <code class="method-signature language-php">Redis|int|false sDiffStore(string $dst, string $key, string ...$other_keys)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>This method performs the same operation as SDIFF except it stores the resulting diff
values in a specified destination key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The key where to store the result</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The first key to perform the DIFF on</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td><p>One or more additional keys.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of values stored in the destination set or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/sdiffstore/">https://redis.io/docs/latest/commands/sdiffstore/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            \Redis::sdiff()
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sDiffStore(&#039;diff:set&#039;, &#039;set:all&#039;, &#039;set:archived&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sInter">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3701">at line 3701</a></div>
        <code class="method-signature language-php">Redis|array|false sInter(array|string $key, string ...$other_keys)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Given one or more Redis SET keys, this command will return all of the elements that are
in every one.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array|string</td>
                <td>$key</td>
                <td><p>The first SET key to intersect.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td><p>One or more Redis SET keys.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/sinter/">https://redis.io/docs/latest/commands/sinter/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;pipeline()
      -&gt;del(&#039;alice_likes&#039;, &#039;bob_likes&#039;, &#039;bill_likes&#039;)
      -&gt;sadd(&#039;alice_likes&#039;, &#039;asparagus&#039;, &#039;broccoli&#039;, &#039;carrot&#039;, &#039;potato&#039;)
      -&gt;sadd(&#039;bob_likes&#039;, &#039;asparagus&#039;, &#039;carrot&#039;, &#039;potato&#039;)
      -&gt;sadd(&#039;bill_likes&#039;, &#039;broccoli&#039;, &#039;potato&#039;)
      -&gt;exec();

var_dump($redis-&gt;sinter(&#039;alice_likes&#039;, &#039;bob_likes&#039;, &#039;bill_likes&#039;));</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sintercard">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3721">at line 3721</a></div>
        <code class="method-signature language-php">Redis|int|false sintercard(array $keys, int $limit = -1)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Compute the intersection of one or more sets and return the cardinality of the result.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One or more set key names.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$limit</td>
                <td><p>A maximum cardinality to return.  This is useful to put an upper bound
on the amount of work Redis will do.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td>The</td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/sintercard/">https://redis.io/docs/latest/commands/sintercard/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sAdd(&#039;set1&#039;, &#039;apple&#039;, &#039;pear&#039;, &#039;banana&#039;, &#039;carrot&#039;);
$redis-&gt;sAdd(&#039;set2&#039;, &#039;apple&#039;,         &#039;banana&#039;);
$redis-&gt;sAdd(&#039;set3&#039;,          &#039;pear&#039;, &#039;banana&#039;);

$redis-&gt;sInterCard([&#039;set1&#039;, &#039;set2&#039;, &#039;set3&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sInterStore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3742">at line 3742</a></div>
        <code class="method-signature language-php">Redis|int|false sInterStore(array|string $key, string ...$other_keys)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Perform the intersection of one or more Redis SETs, storing the result in a destination
key, rather than returning them.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array|string</td>
                <td>$key</td>
                <td><p>Either a string key, or an array of keys (with at least two
elements, consisting of the destination key name and one
or more source keys names.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td><p>If the first argument was a string, subsequent arguments should
be source key names.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of values stored in the destination key or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/sinterstore/">https://redis.io/docs/latest/commands/sinterstore/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            \Redis::sinter()
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sInterStore([&#039;dst&#039;, &#039;src1&#039;, &#039;src2&#039;, &#039;src3&#039;]);
$redis-&gt;sInterStore(&#039;dst&#039;, &#039;src1&#039;, &#039;src&#039;2&#039;, &#039;src3&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sMembers">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3757">at line 3757</a></div>
        <code class="method-signature language-php">Redis|array|false sMembers(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve every member from a set key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The set name.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>Every element in the set or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/smembers/">https://redis.io/docs/latest/commands/smembers/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sAdd(&#039;tng-crew&#039;, ...[&#039;Picard&#039;, &#039;Riker&#039;, &#039;Data&#039;, &#039;Worf&#039;, &#039;La Forge&#039;, &#039;Troi&#039;, &#039;Crusher&#039;, &#039;Broccoli&#039;]);
$redis-&gt;sMembers(&#039;tng-crew&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sMisMember">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3777">at line 3777</a></div>
        <code class="method-signature language-php">Redis|array|false sMisMember(string $key, string $member, string ...$other_members)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Check if one or more values are members of a set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The set to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$member</td>
                <td><p>The first value to test if exists in the set.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_members</td>
                <td><p>Any number of additional values to check.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array of integers representing whether each passed value
was a member of the set.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/smismember/">https://redis.io/docs/latest/commands/smismember/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/smember/">https://redis.io/docs/latest/commands/smember/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            \Redis::smember()
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sAdd(&#039;ds9-crew&#039;, ...[&quot;Sisko&quot;, &quot;Kira&quot;, &quot;Dax&quot;, &quot;Worf&quot;, &quot;Bashir&quot;, &quot;O&#039;Brien&quot;]);
$members = $redis-&gt;sMIsMember(&#039;ds9-crew&#039;, ...[&#039;Sisko&#039;, &#039;Picard&#039;, &#039;Data&#039;, &#039;Worf&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sMove">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3797">at line 3797</a></div>
        <code class="method-signature language-php">Redis|bool sMove(string $src, string $dst, mixed $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop a member from one set and push it onto another.  This command will create the
destination set if it does not currently exist.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$src</td>
                <td><p>The source set.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The destination set.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The member you wish to move.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the member was moved, and false if it wasn't in the set.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/smove/">https://redis.io/docs/latest/commands/smove/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sAdd(&#039;numbers&#039;, &#039;zero&#039;, &#039;one&#039;, &#039;two&#039;, &#039;three&#039;, &#039;four&#039;);
$redis-&gt;sMove(&#039;numbers&#039;, &#039;evens&#039;, &#039;zero&#039;);
$redis-&gt;sMove(&#039;numbers&#039;, &#039;evens&#039;, &#039;two&#039;);
$redis-&gt;sMove(&#039;numbers&#039;, &#039;evens&#039;, &#039;four&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sPop">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3813">at line 3813</a></div>
        <code class="method-signature language-php">Redis|string|array|false sPop(string $key, int $count = 0)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove one or more elements from a set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The set in question.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional number of members to pop.   This defaults to
removing one element.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string|array|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/spop/">https://redis.io/docs/latest/commands/spop/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;del(&#039;numbers&#039;, &#039;evens&#039;);
$redis-&gt;sAdd(&#039;numbers&#039;, &#039;zero&#039;, &#039;one&#039;, &#039;two&#039;, &#039;three&#039;, &#039;four&#039;);
$redis-&gt;sPop(&#039;numbers&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sRandMember">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3836">at line 3836</a></div>
        <code class="method-signature language-php">mixed sRandMember(string $key, int $count = 0)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve one or more random members of a set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The set to query.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional count of members to return.</p>
<p>If this value is positive, Redis will return <em>up to</em> the requested
number but with unique elements that will never repeat.  This means
you may receive fewer then <code>$count</code> replies.</p>
<p>If the number is negative, Redis will return the exact number requested
but the result may contain duplicate elements.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>One or more random members or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/srandmember/">https://redis.io/docs/latest/commands/srandmember/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sRandMember(&#039;myset&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;sRandMember(&#039;myset&#039;, 10);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;sRandMember(&#039;myset&#039;, -10);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sUnion">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3850">at line 3850</a></div>
        <code class="method-signature language-php">Redis|array|false sUnion(string $key, string ...$other_keys)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Returns the union of one or more Redis SET keys.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The first SET to do a union with</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td><p>One or more subsequent keys</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The union of the one or more input sets or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/sunion/">https://redis.io/docs/latest/commands/sunion/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sunion(&#039;set1&#039;, &#039;set2&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sUnionStore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3869">at line 3869</a></div>
        <code class="method-signature language-php">Redis|int|false sUnionStore(string $dst, string $key, string ...$other_keys)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Perform a union of one or more Redis SET keys and store the result in a new set</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The destination key</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The first source key</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td><p>One or more additional source keys</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of elements stored in the destination SET or
false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/sunionstore/">https://redis.io/docs/latest/commands/sunionstore/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            \Redis::sunion()
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sUnionStore(&#039;union:set&#039;, &#039;set:a&#039;, &#039;set:b&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_save">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3884">at line 3884</a></div>
        <code class="method-signature language-php">Redis|bool save()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Persist the Redis database to disk.  This command will block the server until the save is
completed.  For a nonblocking alternative, see Redis::bgsave().</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>Returns true unless an error occurs.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/save/">https://redis.io/docs/latest/commands/save/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            \Redis::bgsave()
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;save();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_scan">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3944">at line 3944</a></div>
        <code class="method-signature language-php">array|false scan(null|int|string $iterator, string|null $pattern = null, int $count = 0, string|null $type = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Incrementally scan the Redis keyspace, with optional pattern and type matching.</p></p>                <p><p>A note about Redis::SCAN_NORETRY and Redis::SCAN_RETRY.</p>
<p>For convenience, PhpRedis can retry SCAN commands itself when Redis returns an empty array of
keys with a nonzero iterator.  This can happen when matching against a pattern that very few
keys match inside a key space with a great many keys.  The following example demonstrates how
to use Redis::scan() with the option disabled and enabled.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>null|int|string</td>
                <td>$iterator</td>
                <td><p>The cursor returned by Redis for every subsequent call to SCAN.  On
the initial invocation of the call, it should be initialized by the
caller to NULL.  Each time SCAN is invoked, the iterator will be
updated to a new number, until finally Redis will set the value to
zero, indicating that the scan is complete.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$pattern</td>
                <td><p>An optional glob-style pattern for matching key names.  If passed as
NULL, it is the equivalent of sending '*' (match every key).</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>A hint to redis that tells it how many keys to return in a single
call to SCAN.  The larger the number, the longer Redis may block
clients while iterating the key space.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$type</td>
                <td><p>An optional argument to specify which key types to scan (e.g.
'STRING', 'LIST', 'SET')</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>array|false</td>
            <td><p>An array of keys, or false if no keys were returned for this
invocation of scan.  Note that it is possible for Redis to return
zero keys before having scanned the entire key space, so the caller
should instead continue to SCAN until the iterator reference is
returned to zero.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/scan/">https://redis.io/docs/latest/commands/scan/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_setOption">
Redis::setOption</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);

$redis-&gt;setOption(Redis::OPT_SCAN, Redis::SCAN_NORETRY);

$it = null;

do {
    $keys = $redis-&gt;scan($it, &#039;*zorg*&#039;);
    foreach ($keys as $key) {
        echo &quot;KEY: $key\n&quot;;
    }
} while ($it != 0);

$redis-&gt;setOption(Redis::OPT_SCAN, Redis::SCAN_RETRY);

$it = null;

// When Redis::SCAN_RETRY is enabled, we can use simpler logic, as we will never receive an
// empty array of keys when the iterator is nonzero.
while ($keys = $redis-&gt;scan($it, &#039;*zorg*&#039;)) {
    foreach ($keys as $key) {
        echo &quot;KEY: $key\n&quot;;
    }
}</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_scard">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3957">at line 3957</a></div>
        <code class="method-signature language-php">Redis|int|false scard(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the number of members in a Redis set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The set to get the cardinality of.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The cardinality of the set or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/scard/">https://redis.io/docs/latest/commands/scard/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;scard(&#039;set&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_script">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3972">at line 3972</a></div>
        <code class="method-signature language-php">mixed script(string $command, mixed ...$args)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>An administrative command used to interact with LUA scripts stored on the server.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$command</td>
                <td><p>The script suboperation to execute.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$args</td>
                <td><p>One or more additional argument</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>This command returns various things depending on the specific operation executed.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/script/">https://redis.io/docs/latest/commands/script/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;script(&#039;load&#039;, &#039;return 1&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;script(&#039;exists&#039;, sha1(&#039;return 1&#039;));</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_select">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L3985">at line 3985</a></div>
        <code class="method-signature language-php">Redis|bool select(int $db)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Select a specific Redis database.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>int</td>
                <td>$db</td>
                <td><p>The database to select.  Note that by default Redis has 16 databases (0-15).</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>true on success and false on failure</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/select/">https://redis.io/docs/latest/commands/select/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;select(1);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_set">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4016">at line 4016</a></div>
        <code class="method-signature language-php">Redis|string|bool set(string $key, mixed $value, mixed $options = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Create or set a Redis STRING key to a value.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key name to set.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to set the key to.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$options</td>
                <td><p>Either an array with options for how to perform the set or an
integer with an expiration.  If an expiration is set PhpRedis
will actually send the <code>SETEX</code> command.</p>
<p>OPTION                         DESCRIPTION</p>
<hr />
<p>['EX' =&gt; 60]                   expire 60 seconds.
['PX' =&gt; 6000]                 expire in 6000 milliseconds.
['EXAT' =&gt; time() + 10]        expire in 10 seconds.
['PXAT' =&gt; time()*1000 + 1000] expire in 1 second.
['KEEPTTL' =&gt; true]            Redis will not update the key's current TTL.
['XX']                         Only set the key if it already exists.
['NX']                         Only set the key if it doesn't exist.
['GET']                        Instead of returning <code>+OK</code> return the previous value of the
key or NULL if the key didn't exist.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string|bool</td>
            <td><p>True if the key was set or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/set/">https://redis.io/docs/latest/commands/set/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/setex/">https://redis.io/docs/latest/commands/setex/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;set(&#039;key&#039;, &#039;value&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;set(&#039;key&#039;, &#039;expires_in_60_seconds&#039;, 60);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_setBit">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4032">at line 4032</a></div>
        <code class="method-signature language-php">Redis|int|false setBit(string $key, int $idx, bool $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set a specific bit in a Redis string to zero or one</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The Redis STRING key to modify</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$idx</td>
                <td></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$value</td>
                <td><p>Whether to set the bit to zero or one.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The original value of the bit or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/setbit/">https://redis.io/docs/latest/commands/setbit/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;set(&#039;foo&#039;, &#039;bar&#039;);
$redis-&gt;setbit(&#039;foo&#039;, 7, 1);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_setRange">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4049">at line 4049</a></div>
        <code class="method-signature language-php">Redis|int|false setRange(string $key, int $index, string $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Update or append to a Redis string at a specific starting index</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to update</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$index</td>
                <td><p>Where to insert the provided value</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$value</td>
                <td><p>The value to copy into the string.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The new length of the string or false on failure</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/setrange/">https://redis.io/docs/latest/commands/setrange/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;set(&#039;message&#039;, &#039;Hello World&#039;);
$redis-&gt;setRange(&#039;message&#039;, 6, &#039;Redis&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_setOption">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4084">at line 4084</a></div>
        <code class="method-signature language-php">bool setOption(int $option, mixed $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set a configurable option on the Redis object.</p></p>                <p><p>Following are a list of options you can set:</p>
<table>
<thead>
<tr>
<th>OPTION</th>
<th>TYPE</th>
<th>DESCRIPTION</th>
</tr>
</thead>
<tbody>
<tr>
<td>OPT_MAX_RETRIES</td>
<td>int</td>
<td>The maximum number of times Redis will attempt to reconnect if it gets disconnected, before throwing an exception.</td>
</tr>
<tr>
<td>OPT_SCAN</td>
<td>enum</td>
<td>Redis::OPT_SCAN_RETRY, or Redis::OPT_SCAN_NORETRY.  Whether PhpRedis should automatically SCAN again when zero keys but a nonzero iterator are returned.</td>
</tr>
<tr>
<td>OPT_SERIALIZER</td>
<td>enum</td>
<td>Set the automatic data serializer.<br><code>Redis::SERIALIZER_NONE</code><br><code>Redis::SERIALIZER_PHP</code><br><code>Redis::SERIALIZER_IGBINARY</code><br><code>Redis::SERIALIZER_MSGPACK</code>, <code>Redis::SERIALIZER_JSON</code></td>
</tr>
<tr>
<td>OPT_PREFIX</td>
<td>string</td>
<td>A string PhpRedis will use to prefix every key we read or write.</td>
</tr>
<tr>
<td>OPT_READ_TIMEOUT</td>
<td>float</td>
<td>How long PhpRedis will block for a response from Redis before throwing a 'read error on connection' exception.</td>
</tr>
<tr>
<td>OPT_TCP_KEEPALIVE</td>
<td>bool</td>
<td>Set or disable TCP_KEEPALIVE on the connection.</td>
</tr>
<tr>
<td>OPT_COMPRESSION</td>
<td>enum</td>
<td>Set the compression algorithm<br><code>Redis::COMPRESSION_NONE</code><br><code>Redis::COMPRESSION_LZF</code><br><code>Redis::COMPRESSION_LZ4</code><br> <code>Redis::COMPRESSION_ZSTD</code></td>
</tr>
<tr>
<td>OPT_REPLY_LITERAL</td>
<td>bool</td>
<td>If set to true, PhpRedis will return the literal string Redis returns for LINE replies (e.g. '+OK'), rather than <code>true</code>.</td>
</tr>
<tr>
<td>OPT_COMPRESSION_LEVEL</td>
<td>int</td>
<td>Set a specific compression level if Redis is compressing data.</td>
</tr>
<tr>
<td>OPT_NULL_MULTIBULK_AS_NULL</td>
<td>bool</td>
<td>Causes PhpRedis to return <code>NULL</code> rather than <code>false</code> for NULL MULTIBULK replies</td>
</tr>
<tr>
<td>OPT_BACKOFF_ALGORITHM</td>
<td>enum</td>
<td>The exponential backoff strategy to use.</td>
</tr>
<tr>
<td>OPT_BACKOFF_BASE</td>
<td>int</td>
<td>The minimum delay between retries when backing off.</td>
</tr>
<tr>
<td>OPT_BACKOFF_CAP</td>
<td>int</td>
<td>The maximum delay between replies when backing off.</td>
</tr>
</tbody>
</table></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>int</td>
                <td>$option</td>
                <td><p>The option constant.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The option value.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td><p>true if the setting was updated, false if not.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_getOption">
Redis::getOption</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method___construct">
Redis::__construct</a>
                                    </td>
                <td>for details about backoff strategies.</td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;setOption(Redis::OPT_PREFIX, &#039;app:&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_setex">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4099">at line 4099</a></div>
        <code class="method-signature language-php">Redis|bool setex(string $key, int $expire, mixed $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set a Redis STRING key with a specific expiration in seconds.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The name of the key to set.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$expire</td>
                <td><p>The key's expiration in seconds.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to set the key.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td><a href="Redis.html">Redis</a>|bool</td>
            <td><p>True on success or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/setex/">https://redis.io/docs/latest/commands/setex/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;setex(&#039;60s-ttl&#039;, 60, &#039;some-value&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_setnx">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4114">at line 4114</a></div>
        <code class="method-signature language-php">Redis|bool setnx(string $key, mixed $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set a key to a value, but only if that key does not already exist.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key name to set.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>What to set the key to.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>Returns true if the key was set and false otherwise.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/setnx/">https://redis.io/docs/latest/commands/setnx/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;setnx(&#039;existing-key&#039;, &#039;existing-value&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;setnx(&#039;new-key&#039;, &#039;new-value&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sismember">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4128">at line 4128</a></div>
        <code class="method-signature language-php">Redis|bool sismember(string $key, mixed $value)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Check whether a given value is the member of a Redis SET.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The redis set to check.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The value to test.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True if the member exists and false if not.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/sismember/">https://redis.io/docs/latest/commands/sismember/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sismember(&#039;myset&#039;, &#039;mem1&#039;, &#039;mem2&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_slaveof">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4148">at line 4148</a></div>
        <code class="method-signature language-php">Redis|bool slaveof(string|null $host = null, int $port = 6379) deprecated</code>
    </h3>
    <div class="details">    
            <p>
                <small><span class="label label-danger">deprecated</span></small>
                            <tr>
                    <td></td>
                    <td></td>
                </tr>
                    </p>
    
            

        <div class="method-description">
                            <p><p>Turn a redis instance into a replica of another or promote a replica
to a primary.</p></p>                <p><p>This method and the corresponding command in Redis has been marked deprecated
and users should instead use Redis::replicaof() if connecting to redis-server</p>
<blockquote>
<p>= 5.0.0.</p>
</blockquote></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string|null</td>
                <td>$host</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$port</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/slaveof/">https://redis.io/docs/latest/commands/slaveof/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/replicaof/">https://redis.io/docs/latest/commands/replicaof/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_replicaof">
Redis::replicaof</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;slaveof(&#039;10.0.0.5&#039;, 6380);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_replicaof">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4174">at line 4174</a></div>
        <code class="method-signature language-php">Redis|bool replicaof(string|null $host = null, int $port = 6379)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Used to turn a Redis instance into a replica of another, or to remove
replica status promoting the instance to a primary.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string|null</td>
                <td>$host</td>
                <td><p>The host of the primary to start replicating.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$port</td>
                <td><p>The port of the primary to start replicating.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>Success if we were successfully able to start replicating a primary or
were able to promote the replicat to a primary.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/replicaof/">https://redis.io/docs/latest/commands/replicaof/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/slaveof/">https://redis.io/docs/latest/commands/slaveof/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_slaveof">
Redis::slaveof</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);

// Attempt to become a replica of a Redis instance at 127.0.0.1:9999
$redis-&gt;replicaof(&#039;127.0.0.1&#039;, 9999);

// When passed no arguments, PhpRedis will deliver the command `REPLICAOF NO ONE`
// attempting to promote the instance to a primary.
$redis-&gt;replicaof();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_touch">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4192">at line 4192</a></div>
        <code class="method-signature language-php">Redis|int|false touch(array|string $key_or_array, string ...$more_keys)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Update one or more keys last modified metadata.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array|string</td>
                <td>$key_or_array</td>
                <td><p>Either the first key or if passed as the only argument
an array of keys.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$more_keys</td>
                <td><p>One or more keys to send to the command.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>This command returns the number of keys that exist and
had their last modified time reset</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/touch/">https://redis.io/docs/latest/commands/touch/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;touch(&#039;cache:1&#039;, &#039;cache:2&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_slowlog">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4220">at line 4220</a></div>
        <code class="method-signature language-php">mixed slowlog(string $operation, int $length = 0)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Interact with Redis' slowlog functionality in various ways, depending
on the value of 'operation'.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$operation</td>
                <td><p>The operation you wish to perform.  This can
be one of the following values:
'GET'   - Retrieve the Redis slowlog as an array.
'LEN'   - Retrieve the length of the slowlog.
'RESET' - Remove all slowlog entries.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$length</td>
                <td><p>This optional argument can be passed when operation
is 'get' and will specify how many elements to retrieve.
If omitted Redis will send up to a default number of
entries, which is configurable.</p>
<p>Note:  With Redis &gt;= 7.0.0 you can send -1 to mean &quot;all&quot;.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/slowlog/">https://redis.io/docs/latest/commands/slowlog/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;slowlog(&#039;get&#039;, -1);   // Retrieve all slowlog entries.</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;slowlog(&#039;len&#039;);       // Retrieve slowlog length.</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;slowlog(&#039;reset&#039;);     // Reset the slowlog.</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sort">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4249">at line 4249</a></div>
        <code class="method-signature language-php">mixed sort(string $key, array|null $options = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Sort the contents of a Redis key in various ways.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key you wish to sort</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td><p>Various options controlling how you would like the
data sorted.  See blow for a detailed description
of this options array.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>This command can either return an array with the sorted data
or the number of elements placed in a destination set when
using the STORE option.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/sort/">https://redis.io/docs/latest/commands/sort/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$options = [
    &#039;SORT&#039;  =&gt; &#039;ASC&#039;|| &#039;DESC&#039; // Sort in descending or descending order.
    &#039;ALPHA&#039; =&gt; true || false  // Whether to sort alphanumerically.
    &#039;LIMIT&#039; =&gt; [0, 10]        // Return a subset of the data at offset, count
    &#039;BY&#039;    =&gt; &#039;weight_*&#039;     // For each element in the key, read data from the
                                 external key weight_* and sort based on that value.
    &#039;GET&#039;   =&gt; &#039;weight_*&#039;     // For each element in the source key, retrieve the
                                 data from key weight_* and return that in the result
                                 rather than the source keys&#039; element.  This can
                                 be used in combination with &#039;BY&#039;
];</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sort_ro">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4261">at line 4261</a></div>
        <code class="method-signature language-php">mixed sort_ro(string $key, array|null $options = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>This is simply a read-only variant of the sort command</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="Redis.html#method_sort">
Redis::sort</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/sort_ro/">https://redis.io/docs/latest/commands/sort_ro/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sort_ro(&#039;numbers&#039;, [&#039;LIMIT&#039; =&gt; [0, 5]]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sortAsc">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4272">at line 4272</a></div>
        <code class="method-signature language-php">array sortAsc(string $key, string|null $pattern = null, mixed $get = null, int $offset = -1, int $count = -1, string|null $store = null) deprecated</code>
    </h3>
    <div class="details">    
            <p>
                <small><span class="label label-danger">deprecated</span></small>
                            <tr>
                    <td></td>
                    <td></td>
                </tr>
                    </p>
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$pattern</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$get</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$offset</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$store</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>array</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/sort/">https://redis.io/docs/latest/commands/sort/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sortAsc(&#039;numbers&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sortAscAlpha">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4283">at line 4283</a></div>
        <code class="method-signature language-php">array sortAscAlpha(string $key, string|null $pattern = null, mixed $get = null, int $offset = -1, int $count = -1, string|null $store = null) deprecated</code>
    </h3>
    <div class="details">    
            <p>
                <small><span class="label label-danger">deprecated</span></small>
                            <tr>
                    <td></td>
                    <td></td>
                </tr>
                    </p>
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$pattern</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$get</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$offset</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$store</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>array</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/sort/">https://redis.io/docs/latest/commands/sort/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sortAscAlpha(&#039;tags&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sortDesc">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4294">at line 4294</a></div>
        <code class="method-signature language-php">array sortDesc(string $key, string|null $pattern = null, mixed $get = null, int $offset = -1, int $count = -1, string|null $store = null) deprecated</code>
    </h3>
    <div class="details">    
            <p>
                <small><span class="label label-danger">deprecated</span></small>
                            <tr>
                    <td></td>
                    <td></td>
                </tr>
                    </p>
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$pattern</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$get</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$offset</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$store</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>array</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/sort/">https://redis.io/docs/latest/commands/sort/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sortDesc(&#039;numbers&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sortDescAlpha">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4305">at line 4305</a></div>
        <code class="method-signature language-php">array sortDescAlpha(string $key, string|null $pattern = null, mixed $get = null, int $offset = -1, int $count = -1, string|null $store = null) deprecated</code>
    </h3>
    <div class="details">    
            <p>
                <small><span class="label label-danger">deprecated</span></small>
                            <tr>
                    <td></td>
                    <td></td>
                </tr>
                    </p>
    
            

        <div class="method-description">
                            <p class="no-description">No description</p>
                    
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$pattern</td>
                <td></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$get</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$offset</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$store</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>array</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/sort/">https://redis.io/docs/latest/commands/sort/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sortDescAlpha(&#039;tags&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_srem">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4320">at line 4320</a></div>
        <code class="method-signature language-php">Redis|int|false srem(string $key, mixed $value, mixed ...$other_values)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove one or more values from a Redis SET key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The Redis SET key in question.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$value</td>
                <td><p>The first value to remove.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$other_values</td>
                <td><p>One or more additional values to remove.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of values removed from the set or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/srem/">https://redis.io/docs/latest/commands/srem/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;sRem(&#039;set1&#039;, &#039;mem1&#039;, &#039;mem2&#039;, &#039;not-in-set&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sscan">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4377">at line 4377</a></div>
        <code class="method-signature language-php">array|false sscan(string $key, null|int|string $iterator, string|null $pattern = null, int $count = 0)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Scan the members of a redis SET key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The Redis SET key in question.</p></td>
            </tr>
                    <tr>
                <td>null|int|string</td>
                <td>$iterator</td>
                <td><p>A reference to an iterator which should be initialized to NULL that
PhpRedis will update with the value returned from Redis after each
subsequent call to SSCAN.  Once this cursor is zero you know all
members have been traversed.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$pattern</td>
                <td><p>An optional glob style pattern to match against, so Redis only
returns the subset of members matching this pattern.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>A hint to Redis as to how many members it should scan in one command
before returning members for that iteration.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>array|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/sscan/">https://redis.io/docs/latest/commands/sscan/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/scan/">https://redis.io/docs/latest/commands/scan/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_setOption">
Redis::setOption</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;del(&#039;myset&#039;);
for ($i = 0; $i &lt; 10000; $i++) {
    $redis-&gt;sAdd(&#039;myset&#039;, &quot;member:$i&quot;);
}
$redis-&gt;sadd(&#039;myset&#039;, &#039;foofoo&#039;);

$redis-&gt;setOption(Redis::OPT_SCAN, Redis::SCAN_NORETRY);

$scanned = 0;
$it = null;

// Without Redis::SCAN_RETRY we may receive empty results and
// a nonzero iterator.
do {
    // Scan members containing &#039;5&#039;
    $members = $redis-&gt;sscan(&#039;myset&#039;, $it, &#039;*5*&#039;);
    foreach ($members as $member) {
         echo &quot;NORETRY: $member\n&quot;;
         $scanned++;
    }
} while ($it != 0);
echo &quot;TOTAL: $scanned\n&quot;;

$redis-&gt;setOption(Redis::OPT_SCAN, Redis::SCAN_RETRY);

$scanned = 0;
$it = null;

// With Redis::SCAN_RETRY PhpRedis will never return an empty array
// when the cursor is non-zero
while (($members = $redis-&gt;sscan(&#039;myset&#039;, $it, &#039;*5*&#039;))) {
    foreach ($members as $member) {
        echo &quot;RETRY: $member\n&quot;;
        $scanned++;
    }
}</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_ssubscribe">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4408">at line 4408</a></div>
        <code class="method-signature language-php">bool ssubscribe(array $channels, callable $cb)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Subscribes the client to the specified shard channels.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$channels</td>
                <td><p>One or more channel names.</p></td>
            </tr>
                    <tr>
                <td>callable</td>
                <td>$cb</td>
                <td><p>The callback PhpRedis will invoke when we receive a message
from one of the subscribed channels.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td><p>True on success, false on faiilure.  Note that this command will block the
client in a subscribe loop, waiting for messages to arrive.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/ssubscribe/">https://redis.io/docs/latest/commands/ssubscribe/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);

$redis-&gt;ssubscribe([&#039;channel-1&#039;, &#039;channel-2&#039;], function ($redis, $channel, $message) {
    echo &quot;[$channel]: $message\n&quot;;

    // Unsubscribe from the message channel when we read &#039;quit&#039;
    if ($message == &#039;quit&#039;) {
        echo &quot;Unsubscribing from &#039;$channel&#039;\n&quot;;
        $redis-&gt;sunsubscribe([$channel]);
    }
});

// Once we read &#039;quit&#039; from both channel-1 and channel-2 the subscribe loop will be
// broken and this command will execute.
echo &quot;Subscribe loop ended\n&quot;;</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_strlen">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4422">at line 4422</a></div>
        <code class="method-signature language-php">Redis|int|false strlen(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the length of a Redis STRING key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key we want the length of.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The length of the string key if it exists, zero if it does not, and
false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/strlen/">https://redis.io/docs/latest/commands/strlen/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;strlen(&#039;mykey&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_subscribe">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4453">at line 4453</a></div>
        <code class="method-signature language-php">bool subscribe(array $channels, callable $cb)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Subscribe to one or more Redis pubsub channels.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$channels</td>
                <td><p>One or more channel names.</p></td>
            </tr>
                    <tr>
                <td>callable</td>
                <td>$cb</td>
                <td><p>The callback PhpRedis will invoke when we receive a message
from one of the subscribed channels.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>bool</td>
            <td><p>True on success, false on faiilure.  Note that this command will block the
client in a subscribe loop, waiting for messages to arrive.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/subscribe/">https://redis.io/docs/latest/commands/subscribe/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);

$redis-&gt;subscribe([&#039;channel-1&#039;, &#039;channel-2&#039;], function ($redis, $channel, $message) {
    echo &quot;[$channel]: $message\n&quot;;

    // Unsubscribe from the message channel when we read &#039;quit&#039;
    if ($message == &#039;quit&#039;) {
        echo &quot;Unsubscribing from &#039;$channel&#039;\n&quot;;
        $redis-&gt;unsubscribe([$channel]);
    }
});

// Once we read &#039;quit&#039; from both channel-1 and channel-2 the subscribe loop will be
// broken and this command will execute.
echo &quot;Subscribe loop ended\n&quot;;</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_sunsubscribe">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4477">at line 4477</a></div>
        <code class="method-signature language-php">Redis|array|bool sunsubscribe(array $channels)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Unsubscribes the client from the given shard channels,
or from all of them if none is given.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$channels</td>
                <td><p>One or more channels to unsubscribe from.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|bool</td>
            <td><p>The array of unsubscribed channels.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/sunsubscribe/">https://redis.io/docs/latest/commands/sunsubscribe/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_ssubscribe">
Redis::ssubscribe</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;ssubscribe([&#039;channel-1&#039;, &#039;channel-2&#039;], function ($redis, $channel, $message) {
    if ($message == &#039;quit&#039;) {
        echo &quot;$channel =&gt; &#039;quit&#039; detected, unsubscribing!\n&quot;;
        $redis-&gt;sunsubscribe([$channel]);
    } else {
        echo &quot;$channel =&gt; $message\n&quot;;
    }
});

echo &quot;We&#039;ve unsubscribed from both channels, exiting\n&quot;;</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_swapdb">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4500">at line 4500</a></div>
        <code class="method-signature language-php">Redis|bool swapdb(int $src, int $dst)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Atomically swap two Redis databases so that all of the keys in the source database will
now be in the destination database and vice-versa.</p></p>                <p><p>Note: This command simply swaps Redis' internal pointer to the database and is therefore
very fast, regardless of the size of the underlying databases.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>int</td>
                <td>$src</td>
                <td><p>The source database number</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$dst</td>
                <td><p>The destination database number</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>Success if the databases could be swapped and false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/swapdb/">https://redis.io/docs/latest/commands/swapdb/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_del">
Redis::del</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;select(0);
$redis-&gt;set(&#039;db0-key&#039;, &#039;db0-value&#039;);
$redis-&gt;swapdb(0, 1);
$redis-&gt;get(&#039;db0-key&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_time">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4512">at line 4512</a></div>
        <code class="method-signature language-php">Redis|array time()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the server time from the connected Redis instance.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array</td>
            <td><p>A two element array consisting of a Unix Timestamp and the number of microseconds
elapsed since the second.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/time/">https://redis.io/docs/latest/commands/time/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;time();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_ttl">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4526">at line 4526</a></div>
        <code class="method-signature language-php">Redis|int|false ttl(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the amount of time a Redis key has before it will expire, in seconds.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The Key we want the TTL for.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>(a) The number of seconds until the key expires, or -1 if the key has
no expiration, and -2 if the key does not exist.  In the event of an
error, this command will return false.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/ttl/">https://redis.io/docs/latest/commands/ttl/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;ttl(&#039;mykey&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_type">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4552">at line 4552</a></div>
        <code class="method-signature language-php">Redis|int|false type(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the type of a given Redis key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to check</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The Redis type constant or false on failure.</p>
<p>The Redis class defines several type constants that correspond with Redis key types.</p>
<pre><code>Redis::REDIS_NOT_FOUND
Redis::REDIS_STRING
Redis::REDIS_SET
Redis::REDIS_LIST
Redis::REDIS_ZSET
Redis::REDIS_HASH
Redis::REDIS_STREAM
Redis::REDIS_VECTORSET</code></pre></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/type/">https://redis.io/docs/latest/commands/type/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">foreach ($redis-&gt;keys(&#039;*&#039;) as $key) {
    echo &quot;$key =&gt; &quot; . $redis-&gt;type($key) . &quot;\n&quot;;
}</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_unlink">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4573">at line 4573</a></div>
        <code class="method-signature language-php">Redis|int|false unlink(array|string $key, string ...$other_keys)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Delete one or more keys from the Redis database.  Unlike this operation, the actual
deletion is asynchronous, meaning it is safe to delete large keys without fear of
Redis blocking for a long period of time.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array|string</td>
                <td>$key</td>
                <td><p>Either an array with one or more keys or a string with
the first key to delete.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td><p>If the first argument passed to this method was a string
you may pass any number of additional key names.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of keys deleted or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/unlink/">https://redis.io/docs/latest/commands/unlink/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/del/">https://redis.io/docs/latest/commands/del/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_del">
Redis::del</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;unlink(&#039;key1&#039;, &#039;key2&#039;, &#039;key3&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;unlink([&#039;key1&#039;, &#039;key2&#039;, &#039;key3&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_unsubscribe">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4596">at line 4596</a></div>
        <code class="method-signature language-php">Redis|array|bool unsubscribe(array $channels)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Unsubscribe from one or more subscribed channels.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$channels</td>
                <td><p>One or more channels to unsubscribe from.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|bool</td>
            <td><p>The array of unsubscribed channels.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/unsubscribe/">https://redis.io/docs/latest/commands/unsubscribe/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_subscribe">
Redis::subscribe</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;subscribe([&#039;channel-1&#039;, &#039;channel-2&#039;], function ($redis, $channel, $message) {
    if ($message == &#039;quit&#039;) {
        echo &quot;$channel =&gt; &#039;quit&#039; detected, unsubscribing!\n&quot;;
        $redis-&gt;unsubscribe([$channel]);
    } else {
        echo &quot;$channel =&gt; $message\n&quot;;
    }
});

echo &quot;We&#039;ve unsubscribed from both channels, exiting\n&quot;;</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_unwatch">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4611">at line 4611</a></div>
        <code class="method-signature language-php">Redis|bool unwatch()</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove any previously WATCH'ed keys in a transaction.</p></p>                        
        </div>
        <div class="tags">
            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>True on success and false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/unwatch/">https://redis.io/docs/latest/commands/unwatch/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/unwatch/">https://redis.io/docs/latest/commands/unwatch/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_watch">
Redis::watch</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;unwatch();</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_watch">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4651">at line 4651</a></div>
        <code class="method-signature language-php">Redis|bool watch(array|string $key, string ...$other_keys)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Watch one or more keys for conditional execution of a transaction.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array|string</td>
                <td>$key</td>
                <td><p>Either an array with one or more key names, or a string key name</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>...$other_keys</td>
                <td><p>If the first argument was passed as a string, any number of additional
string key names may be passed variadically.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/watch/">https://redis.io/docs/latest/commands/watch/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/unwatch/">https://redis.io/docs/latest/commands/unwatch/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis1 = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);
$redis2 = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);

// Start watching &#039;incr-key&#039;
$redis1-&gt;watch(&#039;incr-key&#039;);

// Retrieve its value.
$val = $redis1-&gt;get(&#039;incr-key&#039;);

// A second client modifies &#039;incr-key&#039; after we read it.
$redis2-&gt;set(&#039;incr-key&#039;, 0);

// Because another client changed the value of &#039;incr-key&#039; after we read it, this
// is no longer a proper increment operation, but because we are `WATCH`ing the
// key, this transaction will fail and we can try again.
//
// If were to comment out the above `$redis2-&gt;set(&#039;incr-key&#039;, 0)` line the
// transaction would succeed.
$redis1-&gt;multi();
$redis1-&gt;set(&#039;incr-key&#039;, $val + 1);
$res = $redis1-&gt;exec();

// bool(false)
var_dump($res);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_wait">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4668">at line 4668</a></div>
        <code class="method-signature language-php">int|false wait(int $numreplicas, int $timeout)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Block the client up to the provided timeout until a certain number of replicas have confirmed
receiving them.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>int</td>
                <td>$numreplicas</td>
                <td><p>The number of replicas we want to confirm write operations</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$timeout</td>
                <td><p>How long to wait (zero meaning forever).</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>int|false</td>
            <td><p>The number of replicas that have confirmed or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/wait/">https://redis.io/docs/latest/commands/wait/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;wait(1, 1000);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_xack">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4709">at line 4709</a></div>
        <code class="method-signature language-php">int|false xack(string $key, string $group, array $ids)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Acknowledge one or more messages that are pending (have been consumed using XREADGROUP but
not yet acknowledged by XACK.)</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The stream to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$group</td>
                <td><p>The consumer group to use.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$ids</td>
                <td><p>An array of stream entry IDs.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>int|false</td>
            <td><p>The number of acknowledged messages</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xack/">https://redis.io/docs/latest/commands/xack/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xreadgroup/">https://redis.io/docs/latest/commands/xreadgroup/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_xack">
Redis::xack</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xAdd(&#039;ships&#039;, &#039;*&#039;, [&#039;name&#039; =&gt; &#039;Enterprise&#039;]);
$redis-&gt;xAdd(&#039;ships&#039;, &#039;*&#039;, [&#039;name&#039; =&gt; &#039;Defiant&#039;]);

$redis-&gt;xGroup(&#039;CREATE&#039;, &#039;ships&#039;, &#039;Federation&#039;, &#039;0-0&#039;);

// Consume a single message with the consumer group &#039;Federation&#039;
$ship = $redis-&gt;xReadGroup(&#039;Federation&#039;, &#039;Picard&#039;, [&#039;ships&#039; =&gt; &#039;&gt;&#039;], 1);

/* Retrieve the ID of the message we read.
assert(isset($ship[&#039;ships&#039;]));
$id = key($ship[&#039;ships&#039;]);

// The message we just read is now pending.
$res = $redis-&gt;xPending(&#039;ships&#039;, &#039;Federation&#039;));
var_dump($res);

// We can tell Redis we were able to process the message by using XACK
$res = $redis-&gt;xAck(&#039;ships&#039;, &#039;Federation&#039;, [$id]);
assert($res === 1);

// The message should no longer be pending.
$res = $redis-&gt;xPending(&#039;ships&#039;, &#039;Federation&#039;);
var_dump($res);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_xadd">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4732">at line 4732</a></div>
        <code class="method-signature language-php">Redis|string|false xadd(string $key, string $id, array $values, int $maxlen = 0, bool $approx = false, bool $nomkstream = false)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Append a message to a stream.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The stream name.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$id</td>
                <td><p>The ID for the message we want to add.  This can be the special value '<em>'
which means Redis will generate the ID that appends the message to the
end of the stream.  It can also be a value in the form <ms>-</em> which will
generate an ID that appends to the end of entries with the same <ms> value
(if any exist).</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$values</td>
                <td></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$maxlen</td>
                <td><p>If specified Redis will append the new message but trim any number of the
oldest messages in the stream until the length is &lt;= $maxlen.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$approx</td>
                <td><p>Used in conjunction with <code>$maxlen</code>, this flag tells Redis to trim the stream
but in a more efficient way, meaning the trimming may not be exactly to
<code>$maxlen</code> values.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$nomkstream</td>
                <td><p>If passed as <code>TRUE</code>, the stream must exist for Redis to append the message.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xadd/">https://redis.io/docs/latest/commands/xadd/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xAdd(&#039;ds9-season-1&#039;, &#039;1-1&#039;, [&#039;title&#039; =&gt; &#039;Emissary Part 1&#039;]);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;xAdd(&#039;ds9-season-1&#039;, &#039;1-2&#039;, [&#039;title&#039; =&gt; &#039;A Man Alone&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_xautoclaim">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4771">at line 4771</a></div>
        <code class="method-signature language-php">Redis|bool|array xautoclaim(string $key, string $group, string $consumer, int $min_idle, string $start, int $count = -1, bool $justid = false)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>This command allows a consumer to claim pending messages that have been idle for a specified period of time.</p></p>                <p><p>Its purpose is to provide a mechanism for picking up messages that may have had a failed consumer.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The stream to check.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$group</td>
                <td><p>The consumer group to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$consumer</td>
                <td><p>Which consumer to check.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$min_idle</td>
                <td><p>The minimum time in milliseconds for the message to have been pending.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$start</td>
                <td><p>The minimum message id to check.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional limit on how many messages are returned.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$justid</td>
                <td><p>If the client only wants message IDs and not all of their data.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool|array</td>
            <td><p>An array of pending IDs or false if there are none, or on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xautoclaim/">https://redis.io/docs/latest/commands/xautoclaim/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xclaim/">https://redis.io/docs/latest/commands/xclaim/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/data-types/streams-tutorial/">https://redis.io/docs/data-types/streams-tutorial/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xGroup(&#039;CREATE&#039;, &#039;ships&#039;, &#039;combatants&#039;, &#039;0-0&#039;, true);

$redis-&gt;xAdd(&#039;ships&#039;, &#039;1424-74205&#039;, [&#039;name&#039; =&gt; &#039;Defiant&#039;]);

// Consume the [&#039;name&#039; =&gt; &#039;Defiant&#039;] message
$msgs = $redis-&gt;xReadGroup(&#039;combatants&#039;, &quot;Jem&#039;Hadar&quot;, [&#039;ships&#039; =&gt; &#039;&gt;&#039;], 1);

// The &quot;Jem&#039;Hadar&quot; consumer has the message presently
$pending = $redis-&gt;xPending(&#039;ships&#039;, &#039;combatants&#039;);
var_dump($pending);

// Assume control of the pending message with a different consumer.
$res = $redis-&gt;xAutoClaim(&#039;ships&#039;, &#039;combatants&#039;, &#039;Sisko&#039;, 0, &#039;0-0&#039;);

// Now the &#039;Sisko&#039; consumer owns the message
$pending = $redis-&gt;xPending(&#039;ships&#039;, &#039;combatants&#039;);
var_dump($pending);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_xclaim">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4828">at line 4828</a></div>
        <code class="method-signature language-php">Redis|array|bool xclaim(string $key, string $group, string $consumer, int $min_idle, array $ids, array $options)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>This method allows a consumer to take ownership of pending stream entries, by ID.  Another
command that does much the same thing but does not require passing specific IDs is <code>Redis::xAutoClaim</code>.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The stream we wish to claim messages for.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$group</td>
                <td><p>Our consumer group.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$consumer</td>
                <td><p>Our consumer.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$min_idle</td>
                <td><p>The minimum idle-time in milliseconds a message must have for ownership to be transferred.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$ids</td>
                <td></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td><p>An options array that modifies how the command operates.</p>
<pre><code class="language-php"># Following is an options array describing every option you can pass.  Note that
# 'IDLE', and 'TIME' are mutually exclusive.
$options = [
    'IDLE'       =&gt; 3           # Set the idle time of the message to a 3.  By default
                                # the idle time is set to zero.
    'TIME'       =&gt; 1000*time() # Same as IDLE except it takes a unix timestamp in
                                # milliseconds.
    'RETRYCOUNT' =&gt; 0           # Set the retry counter to zero.  By default XCLAIM
                                # doesn't modify the counter.
    'FORCE'                     # Creates the pending message entry even if IDs are
                                # not already
                                # in the PEL with another client.
    'JUSTID'                    # Return only an array of IDs rather than the messages
                                # themselves.
];</code></pre></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|bool</td>
            <td><p>An array of claimed messages or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xclaim/">https://redis.io/docs/latest/commands/xclaim/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xautoclaim./">https://redis.io/docs/latest/commands/xautoclaim./</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xGroup(&#039;CREATE&#039;, &#039;ships&#039;, &#039;combatants&#039;, &#039;0-0&#039;, true);

$redis-&gt;xAdd(&#039;ships&#039;, &#039;1424-74205&#039;, [&#039;name&#039; =&gt; &#039;Defiant&#039;]);

// Consume the [&#039;name&#039; =&gt; &#039;Defiant&#039;] message
$msgs = $redis-&gt;xReadGroup(&#039;combatants&#039;, &quot;Jem&#039;Hadar&quot;, [&#039;ships&#039; =&gt; &#039;&gt;&#039;], 1);

// The &quot;Jem&#039;Hadar&quot; consumer has the message presently
$pending = $redis-&gt;xPending(&#039;ships&#039;, &#039;combatants&#039;);
var_dump($pending);

assert($pending &amp;&amp; isset($pending[1]));

// Claim the message by ID.
$claimed = $redis-&gt;xClaim(&#039;ships&#039;, &#039;combatants&#039;, &#039;Sisko&#039;, 0, [$pending[1]], [&#039;JUSTID&#039;]);
var_dump($claimed);

// Now the &#039;Sisko&#039; consumer owns the message
$pending = $redis-&gt;xPending(&#039;ships&#039;, &#039;combatants&#039;);
var_dump($pending);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_xdel">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4842">at line 4842</a></div>
        <code class="method-signature language-php">Redis|int|false xdel(string $key, array $ids)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove one or more specific IDs from a stream.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The stream to modify.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$ids</td>
                <td><p>One or more message IDs to remove.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of messages removed or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xdel/">https://redis.io/docs/latest/commands/xdel/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xDel(&#039;stream&#039;, [&#039;1-1&#039;, &#039;2-1&#039;, &#039;3-1&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_xdelex">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4861">at line 4861</a></div>
        <code class="method-signature language-php">Relay|array|false xdelex(string $key, array $ids, string|null $mode = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove one or more IDs from a stream with extended options.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The stream to modify.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$ids</td>
                <td><p>One or more message IDs to remove.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$mode</td>
                <td><p>An optional mode argument.  Valid modes
are as follows: KEEPREF | DELREF | ACKED</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Relay|array|false</td>
            <td><p>An array corresponding to IDs. 1 if the id was
deleted and 0 if not.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xdelex/">https://redis.io/docs/latest/commands/xdelex/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xadd(&#039;s&#039;, &#039;*&#039;, [&#039;field&#039; =&gt; &#039;value1&#039;]);
$redis-&gt;xdelex(&#039;s&#039;, [&#039;1-0&#039;], &#039;KEEPREF&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_xgroup">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4902">at line 4902</a></div>
        <code class="method-signature language-php">mixed xgroup(string $operation, string|null $key = null, string|null $group = null, string|null $id_or_consumer = null, bool $mkstream = false, int $entries_read = -2)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p>XGROUP</p>                <p><p>Perform various operation on consumer groups for a particular Redis STREAM.  What the command does
is primarily based on which operation is passed.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$operation</td>
                <td><p>The subcommand you intend to execute.  Valid options are as follows
'HELP'           - Redis will return information about the command
Requires: none
'CREATE'         - Create a consumer group.
Requires:  Key, group, consumer.
'SETID'          - Set the ID of an existing consumer group for the stream.
Requires:  Key, group, id.
'CREATECONSUMER' - Create a new consumer group for the stream.  You must
also pass key, group, and the consumer name you wish to
create.
Requires:  Key, group, consumer.
'DELCONSUMER'    - Delete a consumer from group attached to the stream.
Requires:  Key, group, consumer.
'DESTROY'        - Delete a consumer group from a stream.
Requires:  Key, group.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$key</td>
                <td><p>The STREAM we're operating on.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$group</td>
                <td><p>The consumer group we want to create/modify/delete.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$id_or_consumer</td>
                <td><p>The STREAM id (e.g. '$') or consumer group.  See the operation section
for information about which to send.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$mkstream</td>
                <td><p>This flag may be sent in combination with the 'CREATE' operation, and
cause Redis to also create the STREAM if it doesn't currently exist.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$entries_read</td>
                <td><p>Allows you to set Redis' 'entries-read' STREAM value.  This argument is
only relevant to the 'CREATE' and 'SETID' operations.
Note:  Requires Redis &gt;= 7.0.0.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>This command return various results depending on the operation performed.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xgroup/">https://redis.io/docs/latest/commands/xgroup/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xgroup(&#039;CREATE&#039;, &#039;mystream&#039;, &#039;workers&#039;, &#039;$&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_xinfo">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4921">at line 4921</a></div>
        <code class="method-signature language-php">mixed xinfo(string $operation, string|null $arg1 = null, string|null $arg2 = null, int $count = -1)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve information about a stream key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$operation</td>
                <td><p>The specific info operation to perform.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$arg1</td>
                <td><p>The first argument (depends on operation)</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$arg2</td>
                <td><p>The second argument</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>The COUNT argument to <code>XINFO STREAM</code></p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>mixed</td>
            <td><p>This command can return different things depending on the operation being called.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xinfo/">https://redis.io/docs/latest/commands/xinfo/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xInfo(&#039;CONSUMERS&#039;, &#039;stream&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;xInfo(&#039;GROUPS&#039;, &#039;stream&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;xInfo(&#039;STREAM&#039;, &#039;stream&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_xlen">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4935">at line 4935</a></div>
        <code class="method-signature language-php">Redis|int|false xlen(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the number of messages in a Redis STREAM key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The Stream to check.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of messages or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xlen/">https://redis.io/docs/latest/commands/xlen/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xLen(&#039;stream&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_xpending">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4957">at line 4957</a></div>
        <code class="method-signature language-php">Redis|array|false xpending(string $key, string $group, string|null $start = null, string|null $end = null, int $count = -1, string|null $consumer = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Interact with stream messages that have been consumed by a consumer group but not yet
acknowledged with XACK.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The stream to inspect.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$group</td>
                <td><p>The user group we want to see pending messages from.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$start</td>
                <td><p>The minimum ID to consider.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$end</td>
                <td><p>The maximum ID to consider.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>Optional maximum number of messages to return.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$consumer</td>
                <td><p>If provided, limit the returned messages to a specific consumer.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The pending messages belonging to the stream or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xpending/">https://redis.io/docs/latest/commands/xpending/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xreadgroup/">https://redis.io/docs/latest/commands/xreadgroup/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xpending(&#039;mystream&#039;, &#039;workers&#039;, &#039;-&#039;, &#039;+&#039;, 10);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_xrange">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4974">at line 4974</a></div>
        <code class="method-signature language-php">Redis|array|bool xrange(string $key, string $start, string $end, int $count = -1)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get a range of entries from a STREAM key.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The stream key name to list.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$start</td>
                <td><p>The minimum ID to return.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$end</td>
                <td><p>The maximum ID to return.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional maximum number of entries to return.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|bool</td>
            <td><p>The entries in the stream within the requested range or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xrange/">https://redis.io/docs/latest/commands/xrange/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xRange(&#039;stream&#039;, &#039;0-1&#039;, &#039;0-2&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;xRange(&#039;stream&#039;, &#039;-&#039;, &#039;+&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_xread">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L4998">at line 4998</a></div>
        <code class="method-signature language-php">Redis|array|bool xread(array $streams, int $count = -1, int $block = -1)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Consume one or more unconsumed elements in one or more streams.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$streams</td>
                <td><p>An associative array with stream name keys and minimum id values.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional limit to how many entries are returned <em>per stream</em></p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$block</td>
                <td><p>An optional maximum number of milliseconds to block the caller if no
data is available on any of the provided streams.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|bool</td>
            <td><p>An array of read elements or false if there aren't any.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xread/">https://redis.io/docs/latest/commands/xread/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xAdd(&#039;s03&#039;, &#039;3-1&#039;, [&#039;title&#039; =&gt; &#039;The Search, Part I&#039;]);
$redis-&gt;xAdd(&#039;s03&#039;, &#039;3-2&#039;, [&#039;title&#039; =&gt; &#039;The Search, Part II&#039;]);
$redis-&gt;xAdd(&#039;s03&#039;, &#039;3-3&#039;, [&#039;title&#039; =&gt; &#039;The House Of Quark&#039;]);
$redis-&gt;xAdd(&#039;s04&#039;, &#039;4-1&#039;, [&#039;title&#039; =&gt; &#039;The Way of the Warrior&#039;]);
$redis-&gt;xAdd(&#039;s04&#039;, &#039;4-3&#039;, [&#039;title&#039; =&gt; &#039;The Visitor&#039;]);
$redis-&gt;xAdd(&#039;s04&#039;, &#039;4-4&#039;, [&#039;title&#039; =&gt; &#039;Hippocratic Oath&#039;]);

$redis-&gt;xRead([&#039;s03&#039; =&gt; &#039;3-2&#039;, &#039;s04&#039; =&gt; &#039;4-1&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_xreadgroup">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5033">at line 5033</a></div>
        <code class="method-signature language-php">Redis|array|bool xreadgroup(string $group, string $consumer, array $streams, int $count = 1, int $block = 1)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Read one or more messages using a consumer group.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$group</td>
                <td><p>The consumer group to use.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$consumer</td>
                <td><p>The consumer to use.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$streams</td>
                <td><p>An array of stream names and message IDs</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>Optional maximum number of messages to return</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$block</td>
                <td><p>How long to block if there are no messages available.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|bool</td>
            <td><p>Zero or more unread messages or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xreadgroup/">https://redis.io/docs/latest/commands/xreadgroup/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xGroup(&#039;CREATE&#039;, &#039;episodes&#039;, &#039;ds9&#039;, &#039;0-0&#039;, true);

$redis-&gt;xAdd(&#039;episodes&#039;, &#039;1-1&#039;, [&#039;title&#039; =&gt; &#039;Emissary: Part 1&#039;]);
$redis-&gt;xAdd(&#039;episodes&#039;, &#039;1-2&#039;, [&#039;title&#039; =&gt; &#039;A Man Alone&#039;]);

$messages = $redis-&gt;xReadGroup(&#039;ds9&#039;, &#039;sisko&#039;, [&#039;episodes&#039; =&gt; &#039;&gt;&#039;]);

// After having read the two messages, add another
$redis-&gt;xAdd(&#039;episodes&#039;, &#039;1-3&#039;, [&#039;title&#039; =&gt; &#039;Emissary: Part 2&#039;]);

// Acknowledge the first two read messages
foreach ($messages as $stream =&gt; $stream_messages) {
    $ids = array_keys($stream_messages);
    $redis-&gt;xAck(&#039;stream&#039;, &#039;ds9&#039;, $ids);
}

// We can now pick up where we left off, and will only get the final message
$msgs = $redis-&gt;xReadGroup(&#039;ds9&#039;, &#039;sisko&#039;, [&#039;episodes&#039; =&gt; &#039;&gt;&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_xrevrange">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5051">at line 5051</a></div>
        <code class="method-signature language-php">Redis|array|bool xrevrange(string $key, string $end, string $start, int $count = -1)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get a range of entries from a STREAM key in reverse chronological order.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The stream key to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$end</td>
                <td><p>The maximum message ID to include.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$start</td>
                <td><p>The minimum message ID to include.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional maximum number of messages to include.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|bool</td>
            <td><p>The entries within the requested range, from newest to oldest.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xrevrange/">https://redis.io/docs/latest/commands/xrevrange/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xrange/">https://redis.io/docs/latest/commands/xrange/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xRevRange(&#039;stream&#039;, &#039;0-2&#039;, &#039;0-1&#039;);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;xRevRange(&#039;stream&#039;, &#039;+&#039;, &#039;-&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_vadd">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5069">at line 5069</a></div>
        <code class="method-signature language-php">Redis|int|false vadd(string $key, array $values, mixed $element, array|null $options = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Add to a vector set</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The vector set to add to.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$values</td>
                <td><p>A non-empty array of floating point values</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$element</td>
                <td><p>The element to add to the vector set.</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td><p>An optional options array</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>One if the key was added zero if not.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/vadd/">https://redis.io/docs/latest/commands/vadd/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;vadd(&#039;embeddings&#039;, [0.12, 0.04, 0.88], &#039;doc:1&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_vsim">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5091">at line 5091</a></div>
        <code class="method-signature language-php">Redis|array|false vsim(string $key, mixed $member, array|null $options = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Query similarity of a vector by element or scores</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The vector set to query.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$member</td>
                <td><p>Either an element or array of scores. PhpRedis
will attempt to infer which it is, but since
there can be some ambiguity here due to
serialization you can also explicitly specify
<code>ELE</code>, <code>VALUES</code>, or <code>FP32</code> in the options
array.</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td><p>An optional options array</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array of elements and their similarity scores, or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/vsim/">https://redis.io/docs/latest/commands/vsim/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;vsim(&#039;embeddings&#039;, &#039;doc:1&#039;, [&#039;COUNT&#039; =&gt; 3]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_vcard">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5106">at line 5106</a></div>
        <code class="method-signature language-php">Redis|int|false vcard(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the length of a vector set</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The vector set to query.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of elements in the vector set or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/vcard/">https://redis.io/docs/latest/commands/vcard/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;vcard(&#039;embeddings&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_vdim">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5121">at line 5121</a></div>
        <code class="method-signature language-php">Redis|int|false vdim(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the dimensions of a vector set</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The vector set to query.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of dimensions in the vector set or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/vdim/">https://redis.io/docs/latest/commands/vdim/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;vdim(&#039;embeddings&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_vinfo">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5136">at line 5136</a></div>
        <code class="method-signature language-php">Redis|array|false vinfo(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get various bits of information about a vector set</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The vector set to query.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array of information about the vector set or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/vinfo/">https://redis.io/docs/latest/commands/vinfo/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;vinfo(&#039;embeddings&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_vismember">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5152">at line 5152</a></div>
        <code class="method-signature language-php">Redis|bool vismember(string $key, mixed $member)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Check if an element is a member of a vectorset</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The vector set to query.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$member</td>
                <td><p>The member to check for.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|bool</td>
            <td><p>true if the member exists, false if it does not.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/vismember/">https://redis.io/docs/latest/commands/vismember/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;vismember(&#039;embeddings&#039;, &#039;doc:1&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_vemb">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5169">at line 5169</a></div>
        <code class="method-signature language-php">Redis|array|false vemb(string $key, mixed $member, bool $raw = false)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the embeddings for a specific member</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The vector set to query.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$member</td>
                <td><p>The member to query.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$raw</td>
                <td><p>If set to <code>true</code>, the raw embeddings will be returned</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array of embeddings for the member or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/vemb/">https://redis.io/docs/latest/commands/vemb/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;vemb(&#039;embeddings&#039;, &#039;doc:1&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_vrandmember">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5183">at line 5183</a></div>
        <code class="method-signature language-php">Redis|array|string|false vrandmember(string $key, int $count = 0)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get one or more random members from a vector set</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The vector set to query.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>The number of random members to return.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|string|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/vrandmember/">https://redis.io/docs/latest/commands/vrandmember/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;vrandmember(&#039;embeddings&#039;, 2);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_vrange">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5201">at line 5201</a></div>
        <code class="method-signature language-php">Redis|array|false vrange(string $key, string $min, string $max, int $count = -1)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retreive a lexographical range of elements from a vector set</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The vector set to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$min</td>
                <td><p>The minimum element to return.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$max</td>
                <td><p>The maximum element to return.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional maximum number of elements to return.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array of elements in the requested range or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/vrange/">https://redis.io/docs/latest/commands/vrange/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;vrange(&#039;embeddings&#039;, &#039;-&#039;, &#039;+&#039;, 5);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_vrem">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5217">at line 5217</a></div>
        <code class="method-signature language-php">Redis|int|false vrem(string $key, mixed $member)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove an element from a vector set</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The vector set to remove from.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$member</td>
                <td><p>The member to remove.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>1 if the member was removed, 0 if it was not.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/vrem/">https://redis.io/docs/latest/commands/vrem/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;vrem(&#039;embeddings&#039;, &#039;doc:1&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_vsetattr">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5236">at line 5236</a></div>
        <code class="method-signature language-php">Redis|int|false vsetattr(string $key, mixed $member, array|string $attributes)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Set the attributes of a vector set element</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The vector set to modify.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$member</td>
                <td><p>The member to modify.</p></td>
            </tr>
                    <tr>
                <td>array|string</td>
                <td>$attributes</td>
                <td><p>The attributes to set. This should either
be a json encoded string or an array which
will be json encoded.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>1 if the attributes were set, 0 if they were not.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/vsetattr/">https://redis.io/docs/latest/commands/vsetattr/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;vsetattr(&#039;embeddings&#039;, &#039;doc:1&#039;, [&#039;topic&#039; =&gt; &#039;tech&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_vgetattr">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5253">at line 5253</a></div>
        <code class="method-signature language-php">Redis|array|string|false vgetattr(string $key, mixed $member, bool $decode = true)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the attributes of a vector set element</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The vector set to query.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$member</td>
                <td><p>The member to query.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$decode</td>
                <td><p>Whether to automatically deserialize any returned json.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|string|false</td>
            <td><p>An array of attributes for the member or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/vgetattr/">https://redis.io/docs/latest/commands/vgetattr/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;vgetattr(&#039;embeddings&#039;, &#039;doc:1&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_vlinks">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5270">at line 5270</a></div>
        <code class="method-signature language-php">Redis|array|false vlinks(string $key, mixed $member, bool $withscores = false)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get any adajcent values for a member of a vector set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The vector set to query.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$member</td>
                <td><p>The member to query.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$withscores</td>
                <td><p>If set to <code>true</code>, the scores of the adjacent values will be returned.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array of adjacent values and their scores, or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/vlinks/">https://redis.io/docs/latest/commands/vlinks/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;vlinks(&#039;embeddings&#039;, &#039;doc:1&#039;, true);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_xtrim">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5292">at line 5292</a></div>
        <code class="method-signature language-php">Redis|int|false xtrim(string $key, string $threshold, bool $approx = false, bool $minid = false, int $limit = -1)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Truncate a STREAM key in various ways.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The STREAM key to trim.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$threshold</td>
                <td><p>This can either be a maximum length, or a minimum id.
MAXLEN - An integer describing the maximum desired length of the stream after the command.
MINID  - An ID that will become the new minimum ID in the stream, as Redis will trim all
messages older than this ID.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$approx</td>
                <td><p>Whether redis is allowed to do an approximate trimming of the stream.  This is
more efficient for Redis given how streams are stored internally.</p></td>
            </tr>
                    <tr>
                <td>bool</td>
                <td>$minid</td>
                <td><p>When set to <code>true</code>, users should pass a minimum ID to the <code>$threshold</code> argument.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$limit</td>
                <td><p>An optional upper bound on how many entries to trim during the command.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of entries deleted from the stream.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/xtrim/">https://redis.io/docs/latest/commands/xtrim/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;xTrim(&#039;stream&#039;, 3);</pre></td>
            </tr>
                    <tr>
                <td><pre class="examples">$redis-&gt;xTrim(&#039;stream&#039;, &#039;2-1&#039;, false, true);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zAdd">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5333">at line 5333</a></div>
        <code class="method-signature language-php">Redis|int|float|false zAdd(string $key, array|float $score_or_options, mixed ...$more_scores_and_mems)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Add one or more elements and scores to a Redis sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set in question.</p></td>
            </tr>
                    <tr>
                <td>array|float</td>
                <td>$score_or_options</td>
                <td><p>Either the score for the first element, or an array of options.</p>
<pre><code class="language-php"> $options = [
     'NX',       # Only update elements that already exist
     'NX',       # Only add new elements but don't update existing ones.

     'LT'        # Only update existing elements if the new score is
                 # less than the existing one.
     'GT'        # Only update existing elements if the new score is
                 # greater than the existing one.

     'CH'        # Instead of returning the number of elements added,
                 # Redis will return the number Of elements that were
                 # changed in the operation.

     'INCR'      # Instead of setting each element to the provide score,
                 # increment the element by the
                 # provided score, much like ZINCRBY.  When this option
                 # is passed, you may only send a single score and member.
 ];</code></pre>
<p>Note:  'GX', 'LT', and 'NX' cannot be passed together, and PhpRedis
will send whichever one is last in the options array.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$more_scores_and_mems</td>
                <td><p>A variadic number of additional scores and members.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|float|false</td>
            <td><p>The return value varies depending on the options passed.</p>
<p>Following is information about the options that may be passed as the second argument:</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zadd/">https://redis.io/docs/latest/commands/zadd/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zadd(&#039;zs&#039;, 1, &#039;first&#039;, 2, &#039;second&#039;, 3, &#039;third&#039;);
$redis-&gt;zAdd(&#039;zs&#039;, [&#039;XX&#039;], 8, &#039;second&#039;, 99, &#039;new-element&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zCard">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5346">at line 5346</a></div>
        <code class="method-signature language-php">Redis|int|false zCard(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Return the number of elements in a sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to retrieve cardinality from.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of elements in the set or false on failure</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zcard/">https://redis.io/docs/latest/commands/zcard/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zCard(&#039;zs&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zCount">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5365">at line 5365</a></div>
        <code class="method-signature language-php">Redis|int|false zCount(string $key, int|string $start, int|string $end)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Count the number of members in a sorted set with scores inside a provided range.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to check.</p></td>
            </tr>
                    <tr>
                <td>int|string</td>
                <td>$start</td>
                <td><p>The minimum score to include in the count</p></td>
            </tr>
                    <tr>
                <td>int|string</td>
                <td>$end</td>
                <td><p>The maximum score to include in the count</p>
<p>NOTE:  In addition to a floating point score you may pass the special values of '-inf' and
'+inf' meaning negative and positive infinity, respectively.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zcount/">https://redis.io/docs/latest/commands/zcount/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zCount(&#039;fruit-rankings&#039;, &#039;0&#039;, &#039;+inf&#039;);
$redis-&gt;zCount(&#039;fruit-rankings&#039;, 50, 60);
$redis-&gt;zCount(&#039;fruit-rankings&#039;, &#039;-inf&#039;, 0);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zIncrBy">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5381">at line 5381</a></div>
        <code class="method-signature language-php">Redis|float|false zIncrBy(string $key, float $value, mixed $member)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Create or increment the score of a member in a Redis sorted set</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set in question.</p></td>
            </tr>
                    <tr>
                <td>float</td>
                <td>$value</td>
                <td><p>How much to increment the score.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$member</td>
                <td></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|float|false</td>
            <td><p>The new score of the member or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zincrby/">https://redis.io/docs/latest/commands/zincrby/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zIncrBy(&#039;zs&#039;, 5.0, &#039;bananas&#039;);
$redis-&gt;zIncrBy(&#039;zs&#039;, 2.0, &#039;eggplants&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zLexCount">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5399">at line 5399</a></div>
        <code class="method-signature language-php">Redis|int|false zLexCount(string $key, string $min, string $max)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Count the number of elements in a sorted set whose members fall within the provided
lexographical range.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to check.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$min</td>
                <td><p>The minimum matching lexographical string</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$max</td>
                <td><p>The maximum matching lexographical string</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of members that fall within the range or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zlexcount/">https://redis.io/docs/latest/commands/zlexcount/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;captains&#039;, 0, &#039;Janeway&#039;, 0, &#039;Kirk&#039;, 0, &#039;Picard&#039;, 0, &#039;Sisko&#039;, 0, &#039;Archer&#039;);
$redis-&gt;zLexCount(&#039;captains&#039;, &#039;[A&#039;, &#039;[S&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zMscore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5418">at line 5418</a></div>
        <code class="method-signature language-php">Redis|array|false zMscore(string $key, mixed $member, mixed ...$other_members)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the score of one or more members in a sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$member</td>
                <td><p>The first member to return the score from</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$other_members</td>
                <td><p>One or more additional members to return the scores of.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array of the scores of the requested elements.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zmscore/">https://redis.io/docs/latest/commands/zmscore/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;zs&#039;, 0, &#039;zero&#039;, 1, &#039;one&#039;, 2, &#039;two&#039;, 3, &#039;three&#039;);

$redis-&gt;zMScore(&#039;zs&#039;, &#039;zero&#039;, &#039;two&#039;);
$redis-&gt;zMScore(&#039;zs&#039;, &#039;one&#039;, &#039;not-a-member&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zPopMax">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5436">at line 5436</a></div>
        <code class="method-signature language-php">Redis|array|false zPopMax(string $key, int|null $count = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop one or more of the highest scoring elements from a sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to pop elements from.</p></td>
            </tr>
                    <tr>
                <td>int|null</td>
                <td>$count</td>
                <td><p>An optional count of elements to pop.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>All of the popped elements with scores or false on failure</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zpopmax/">https://redis.io/docs/latest/commands/zpopmax/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;zs&#039;, 0, &#039;zero&#039;, 1, &#039;one&#039;, 2, &#039;two&#039;, 3, &#039;three&#039;);

$redis-&gt;zPopMax(&#039;zs&#039;);
$redis-&gt;zPopMax(&#039;zs&#039;, 2);.</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zPopMin">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5454">at line 5454</a></div>
        <code class="method-signature language-php">Redis|array|false zPopMin(string $key, int|null $count = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Pop one or more of the lowest scoring elements from a sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to pop elements from.</p></td>
            </tr>
                    <tr>
                <td>int|null</td>
                <td>$count</td>
                <td><p>An optional count of elements to pop.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The popped elements with their scores or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zpopmin/">https://redis.io/docs/latest/commands/zpopmin/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;zs&#039;, 0, &#039;zero&#039;, 1, &#039;one&#039;, 2, &#039;two&#039;, 3, &#039;three&#039;);

$redis-&gt;zPopMin(&#039;zs&#039;);
$redis-&gt;zPopMin(&#039;zs&#039;, 2);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zRange">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5490">at line 5490</a></div>
        <code class="method-signature language-php">Redis|array|false zRange(string $key, string|int $start, string|int $end, array|bool|null $options = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve a range of elements of a sorted set between a start and end point.</p></p>                <p><p>How the command works in particular is greatly affected by the options that
are passed in.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set in question.</p></td>
            </tr>
                    <tr>
                <td>string|int</td>
                <td>$start</td>
                <td><p>The starting index we want to return.</p></td>
            </tr>
                    <tr>
                <td>string|int</td>
                <td>$end</td>
                <td><p>The final index we want to return.</p></td>
            </tr>
                    <tr>
                <td>array|bool|null</td>
                <td>$options</td>
                <td><p>This value may either be an array of options to pass to
the command, or for historical purposes a boolean which
controls just the 'WITHSCORES' option.</p>
<pre><code class="language-php">$options = [
    'WITHSCORES' =&gt; true,     # Return both scores and members.
    'LIMIT'      =&gt; [10, 10], # Start at offset 10 and return 10 elements.
    'REV'                     # Return the elements in reverse order
    'BYSCORE',                # Treat `start` and `end` as scores instead
    'BYLEX'                   # Treat `start` and `end` as lexicographical values.
];</code></pre>
<p>Note:  <code>BYLEX</code> and <code>BYSCORE</code> are mutually exclusive.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array with matching elements or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zrange/">https://redis.io/docs/latest/commands/zrange/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zRange(&#039;zset&#039;, 0, -1);
$redis-&gt;zRange(&#039;zset&#039;, &#039;-inf&#039;, &#039;inf&#039;, [&#039;byscore&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zRangeByLex">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5512">at line 5512</a></div>
        <code class="method-signature language-php">Redis|array|false zRangeByLex(string $key, string $min, string $max, int $offset = -1, int $count = -1)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve a range of elements from a sorted set by legographical range.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to retrieve elements from</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$min</td>
                <td><p>The minimum legographical value to return</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$max</td>
                <td><p>The maximum legographical value to return</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$offset</td>
                <td><p>An optional offset within the matching values to return</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional count to limit the replies to (used in conjunction with offset)</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array of matching elements or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zrangebylex/">https://redis.io/docs/latest/commands/zrangebylex/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis = new Redis([&#039;host&#039; =&gt; &#039;localhost&#039;]);
$redis-&gt;zAdd(&#039;captains&#039;, 0, &#039;Janeway&#039;, 0, &#039;Kirk&#039;, 0, &#039;Picard&#039;, 0, &#039;Sisko&#039;, 0, &#039;Archer&#039;);

$redis-&gt;zRangeByLex(&#039;captains&#039;, &#039;[A&#039;, &#039;[S&#039;);
$redis-&gt;zRangeByLex(&#039;captains&#039;, &#039;[A&#039;, &#039;[S&#039;, 2, 2);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zRangeByScore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5534">at line 5534</a></div>
        <code class="method-signature language-php">Redis|array|false zRangeByScore(string $key, string $start, string $end, array $options = [])</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve a range of members from a sorted set by their score.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$start</td>
                <td><p>The minimum score of elements that Redis should return.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$end</td>
                <td><p>The maximum score of elements that Redis should return.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$options</td>
                <td><p>Options that change how Redis will execute the command.</p>
<p>OPTION       TYPE            MEANING
'WITHSCORES' bool            Whether to also return scores.
'LIMIT'      [offset, count] Limit the reply to a subset of elements.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The number of matching elements or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zrangebyscore/">https://redis.io/docs/latest/commands/zrangebyscore/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zRangeByScore(&#039;zs&#039;, 20, 30, [&#039;WITHSCORES&#039; =&gt; true]);
$redis-&gt;zRangeByScore(&#039;zs&#039;, 20, 30, [&#039;WITHSCORES&#039; =&gt; true, &#039;LIMIT&#039; =&gt; [5, 5]]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zrangestore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5558">at line 5558</a></div>
        <code class="method-signature language-php">Redis|int|false zrangestore(string $dstkey, string $srckey, string $start, string $end, array|bool|null $options = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>This command is similar to ZRANGE except that instead of returning the values directly
it will store them in a destination key provided by the user</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$dstkey</td>
                <td><p>The key to store the resulting element(s)</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$srckey</td>
                <td><p>The source key with element(s) to retrieve</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$start</td>
                <td><p>The starting index to store</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$end</td>
                <td><p>The ending index to store</p></td>
            </tr>
                    <tr>
                <td>array|bool|null</td>
                <td>$options</td>
                <td><p>Our options array that controls how the command will function.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of elements stored in $dstkey or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zrange/">https://redis.io/docs/latest/commands/zrange/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            Redis::zRange
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zrangestore(&#039;recent:leaders&#039;, &#039;leaders&#039;, &#039;0&#039;, &#039;9&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zRandMember">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5577">at line 5577</a></div>
        <code class="method-signature language-php">Redis|string|array zRandMember(string $key, array|null $options = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve one or more random members from a Redis sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to pull random members from.</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td><p>One or more options that determine exactly how the command operates.
OPTION       TYPE    MEANING
'COUNT'      int     The number of random members to return.
'WITHSCORES' bool    Whether to return scores and members instead of</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string|array</td>
            <td><p>One or more random elements.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zrandmember/">https://redis.io/docs/latest/commands/zrandmember/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zRandMember(&#039;zs&#039;, [&#039;COUNT&#039; =&gt; 2, &#039;WITHSCORES&#039; =&gt; true]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zRank">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5592">at line 5592</a></div>
        <code class="method-signature language-php">Redis|int|false zRank(string $key, mixed $member)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the rank of a member of a sorted set, by score.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to check.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$member</td>
                <td><p>The member to test.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The rank of the requested member.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zrank/">https://redis.io/docs/latest/commands/zrank/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zRank(&#039;zs&#039;, &#039;zero&#039;);
$redis-&gt;zRank(&#039;zs&#039;, &#039;three&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zRem">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5608">at line 5608</a></div>
        <code class="method-signature language-php">Redis|int|false zRem(mixed $key, mixed $member, mixed ...$other_members)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove one or more members from a Redis sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>mixed</td>
                <td>$key</td>
                <td><p>The sorted set in question.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$member</td>
                <td><p>The first member to remove.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>...$other_members</td>
                <td><p>One or more members to remove passed in a variadic fashion.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of members that were actually removed or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zrem/">https://redis.io/docs/latest/commands/zrem/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zRem(&#039;zs&#039;, &#039;mem:0&#039;, &#039;mem:1&#039;, &#039;mem:2&#039;, &#039;mem:6&#039;, &#039;mem:7&#039;, &#039;mem:8&#039;, &#039;mem:9&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zRemRangeByLex">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5626">at line 5626</a></div>
        <code class="method-signature language-php">Redis|int|false zRemRangeByLex(string $key, string $min, string $max)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove zero or more elements from a Redis sorted set by legographical range.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to remove elements from.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$min</td>
                <td><p>The start of the lexographical range to remove.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$max</td>
                <td><p>The end of the lexographical range to remove</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of elements removed from the set or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zremrangebylex/">https://redis.io/docs/latest/commands/zremrangebylex/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            \Redis::zrangebylex()
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zRemRangeByLex(&#039;zs&#039;, &#039;[a&#039;, &#039;(b&#039;);
$redis-&gt;zRemRangeByLex(&#039;zs&#039;, &#039;(banana&#039;, &#039;(eggplant&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zRemRangeByRank">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5642">at line 5642</a></div>
        <code class="method-signature language-php">Redis|int|false zRemRangeByRank(string $key, int $start, int $end)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove one or more members of a sorted set by their rank.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set where we want to remove members.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$start</td>
                <td><p>The rank when we want to start removing members</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$end</td>
                <td><p>The rank we want to stop removing membersk.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of members removed from the set or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zremrangebyrank/">https://redis.io/docs/latest/commands/zremrangebyrank/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zRemRangeByRank(&#039;zs&#039;, 0, 3);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zRemRangeByScore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5659">at line 5659</a></div>
        <code class="method-signature language-php">Redis|int|false zRemRangeByScore(string $key, string $start, string $end)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Remove one or more members of a sorted set by their score.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set where we want to remove members.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$start</td>
                <td><p>The lowest score to remove.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$end</td>
                <td><p>The highest score to remove.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of members removed from the set or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zremrangebyrank/">https://redis.io/docs/latest/commands/zremrangebyrank/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;zs&#039;, 2, &#039;two&#039;, 4, &#039;four&#039;, 6, &#039;six&#039;);
$redis-&gt;zRemRangeByScore(&#039;zs&#039;, 2, 4);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zRevRange">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5681">at line 5681</a></div>
        <code class="method-signature language-php">Redis|array|false zRevRange(string $key, int $start, int $end, mixed $scores = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>List the members of a Redis sorted set in reverse order</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set in question.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$start</td>
                <td><p>The index to start listing elements</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$end</td>
                <td><p>The index to stop listing elements.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$scores</td>
                <td><p>Whether or not Redis should also return each members score.  See
the example below demonstrating how it may be used.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The members (and possibly scores) of the matching elements or false
on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zrevrange/">https://redis.io/docs/latest/commands/zrevrange/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zRevRange(&#039;zs&#039;, 0, -1);
$redis-&gt;zRevRange(&#039;zs&#039;, 2, 3);
$redis-&gt;zRevRange(&#039;zs&#039;, 0, -1, true);
$redis-&gt;zRevRange(&#039;zs&#039;, 0, -1, [&#039;withscores&#039; =&gt; true]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zRevRangeByLex">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5701">at line 5701</a></div>
        <code class="method-signature language-php">Redis|array|false zRevRangeByLex(string $key, string $max, string $min, int $offset = -1, int $count = -1)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>List members of a Redis sorted set within a legographical range, in reverse order.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to list</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$max</td>
                <td><p>The maximum legographical element to include in the result.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$min</td>
                <td><p>The minimum lexographical element to include in the result.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$offset</td>
                <td><p>An option offset within the matching elements to start at.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>An optional count to limit the replies to.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The matching members or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zrevrangebylex/">https://redis.io/docs/latest/commands/zrevrangebylex/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            \Redis::zrangebylex()
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zRevRangeByLex(&#039;captains&#039;, &#039;[Q&#039;, &#039;[J&#039;);
$redis-&gt;zRevRangeByLex(&#039;captains&#039;, &#039;[Q&#039;, &#039;[J&#039;, 1, 2);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zRevRangeByScore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5736">at line 5736</a></div>
        <code class="method-signature language-php">Redis|array|false zRevRangeByScore(string $key, string $max, string $min, array|bool $options = [])</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>List elements from a Redis sorted set by score, highest to lowest</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to query.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$max</td>
                <td><p>The highest score to include in the results.</p></td>
            </tr>
                    <tr>
                <td>string</td>
                <td>$min</td>
                <td><p>The lowest score to include in the results.</p></td>
            </tr>
                    <tr>
                <td>array|bool</td>
                <td>$options</td>
                <td><p>An options array that modifies how the command executes.</p>
<pre><code class="language-php">$options = [
    'WITHSCORES' =&gt; true|false # Whether or not to return scores
    'LIMIT' =&gt; [offset, count] # Return a subset of the matching members
];</code></pre>
<p>NOTE: For legacy reason, you may also simply pass <code>true</code> for the
options argument, to mean <code>WITHSCORES</code>.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The matching members in reverse order of score or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zrevrangebyscore/">https://redis.io/docs/latest/commands/zrevrangebyscore/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zadd(&#039;oldest-people&#039;, 122.4493, &#039;Jeanne Calment&#039;, 119.2932, &#039;Kane Tanaka&#039;,
                              119.2658, &#039;Sarah Knauss&#039;,   118.7205, &#039;Lucile Randon&#039;,
                              117.7123, &#039;Nabi Tajima&#039;,    117.6301, &#039;Marie-Louise Meilleur&#039;,
                              117.5178, &#039;Violet Brown&#039;,   117.3753, &#039;Emma Morano&#039;,
                              117.2219, &#039;Chiyo Miyako&#039;,   117.0740, &#039;Misao Okawa&#039;);

$redis-&gt;zRevRangeByScore(&#039;oldest-people&#039;, 122, 119);
$redis-&gt;zRevRangeByScore(&#039;oldest-people&#039;, &#039;inf&#039;, 118);
$redis-&gt;zRevRangeByScore(&#039;oldest-people&#039;, &#039;117.5&#039;, &#039;-inf&#039;, [&#039;LIMIT&#039; =&gt; [0, 1]]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zRevRank">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5754">at line 5754</a></div>
        <code class="method-signature language-php">Redis|int|false zRevRank(string $key, mixed $member)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve a member of a sorted set by reverse rank.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to query.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$member</td>
                <td><p>The member to look up.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The reverse rank (the rank if counted high to low) of the member or
false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zrevrank/">https://redis.io/docs/latest/commands/zrevrank/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;ds9-characters&#039;, 10, &#039;Sisko&#039;, 9, &#039;Garak&#039;, 8, &#039;Dax&#039;, 7, &#039;Odo&#039;);

$redis-&gt;zrevrank(&#039;ds9-characters&#039;, &#039;Sisko&#039;);
$redis-&gt;zrevrank(&#039;ds9-characters&#039;, &#039;Garak&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zScore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5770">at line 5770</a></div>
        <code class="method-signature language-php">Redis|float|false zScore(string $key, mixed $member)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Get the score of a member of a sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to query.</p></td>
            </tr>
                    <tr>
                <td>mixed</td>
                <td>$member</td>
                <td><p>The member we wish to query.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|float|false</td>
            <td><p>The score of the requested element or false if it is not found.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zscore/">https://redis.io/docs/latest/commands/zscore/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;telescopes&#039;, 11.9, &#039;LBT&#039;, 10.4, &#039;GTC&#039;, 10, &#039;HET&#039;);
$redis-&gt;zScore(&#039;telescopes&#039;, &#039;LBT&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zdiff">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5791">at line 5791</a></div>
        <code class="method-signature language-php">Redis|array|false zdiff(array $keys, array|null $options = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Given one or more sorted set key names, return every element that is in the first
set but not any of the others.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One or more sorted sets.</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td><p>An array which can contain ['WITHSCORES' =&gt; true] if you want Redis to
return members and scores.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array of members or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zdiff/">https://redis.io/docs/latest/commands/zdiff/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;primes&#039;, 1, &#039;one&#039;, 3, &#039;three&#039;, 5, &#039;five&#039;);
$redis-&gt;zAdd(&#039;evens&#039;, 2, &#039;two&#039;, 4, &#039;four&#039;);
$redis-&gt;zAdd(&#039;mod3&#039;, 3, &#039;three&#039;, 6, &#039;six&#039;);

$redis-&gt;zDiff([&#039;primes&#039;, &#039;evens&#039;, &#039;mod3&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zdiffstore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5811">at line 5811</a></div>
        <code class="method-signature language-php">Redis|int|false zdiffstore(string $dst, array $keys)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Store the difference of one or more sorted sets in a destination sorted set.</p></p>                <p><p>See <a href="Redis.html#method_zdiff">Redis::zdiff</a> for a more detailed description of how the diff operation works.</p></p>        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The destination set name.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One or more source key names</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of elements stored in the destination set or false on
failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zdiff/">https://redis.io/docs/latest/commands/zdiff/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_zdiff">
Redis::zdiff</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zdiffstore(&#039;only:new&#039;, [&#039;all:users&#039;, &#039;inactive:users&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zinter">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5834">at line 5834</a></div>
        <code class="method-signature language-php">Redis|array|false zinter(array $keys, array|null $weights = null, array|null $options = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Compute the intersection of one or more sorted sets and return the members</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One or more sorted sets.</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$weights</td>
                <td><p>An optional array of weights to be applied to each set when performing
the intersection.</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td><p>Options for how Redis should combine duplicate elements when performing the
intersection.  See Redis::zunion() for details.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>All of the members that exist in every set.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zinter/">https://redis.io/docs/latest/commands/zinter/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;TNG&#039;, 2, &#039;Worf&#039;, 2.5, &#039;Data&#039;, 4.0, &#039;Picard&#039;);
$redis-&gt;zAdd(&#039;DS9&#039;, 2.5, &#039;Worf&#039;, 3.0, &#039;Kira&#039;, 4.0, &#039;Sisko&#039;);

$redis-&gt;zInter([&#039;TNG&#039;, &#039;DS9&#039;]);
$redis-&gt;zInter([&#039;TNG&#039;, &#039;DS9&#039;], NULL, [&#039;withscores&#039; =&gt; true]);
$redis-&gt;zInter([&#039;TNG&#039;, &#039;DS9&#039;], NULL, [&#039;withscores&#039; =&gt; true, &#039;aggregate&#039; =&gt; &#039;max&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zintercard">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5857">at line 5857</a></div>
        <code class="method-signature language-php">Redis|int|false zintercard(array $keys, int $limit = -1)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Similar to ZINTER but instead of returning the intersected values, this command returns the
cardinality of the intersected set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One or more sorted set key names.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$limit</td>
                <td><p>An optional upper bound on the returned cardinality.  If set to a value
greater than zero, Redis will stop processing the intersection once the
resulting cardinality reaches this limit.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The cardinality of the intersection or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zintercard/">https://redis.io/docs/latest/commands/zintercard/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zinter/">https://redis.io/docs/latest/commands/zinter/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_zinter">
Redis::zinter</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;zs1&#039;, 1, &#039;one&#039;, 2, &#039;two&#039;, 3, &#039;three&#039;, 4, &#039;four&#039;);
$redis-&gt;zAdd(&#039;zs2&#039;, 2, &#039;two&#039;, 4, &#039;four&#039;);

$redis-&gt;zInterCard([&#039;zs1&#039;, &#039;zs2&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zinterstore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5883">at line 5883</a></div>
        <code class="method-signature language-php">Redis|int|false zinterstore(string $dst, array $keys, array|null $weights = null, string|null $aggregate = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Compute the intersection of one or more sorted sets storing the result in a new sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The destination sorted set to store the intersected values.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One or more sorted set key names.</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$weights</td>
                <td><p>An optional array of floats to weight each passed input set.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$aggregate</td>
                <td><p>An optional aggregation method to use.
'SUM' - Store sum of all intersected members (this is the default).
'MIN' - Store minimum value for each intersected member.
'MAX' - Store maximum value for each intersected member.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The total number of members writtern to the destination set or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zinterstore/">https://redis.io/docs/latest/commands/zinterstore/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zinter/">https://redis.io/docs/latest/commands/zinter/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;zs1&#039;, 3, &#039;apples&#039;, 2, &#039;pears&#039;);
$redis-&gt;zAdd(&#039;zs2&#039;, 4, &#039;pears&#039;, 3, &#039;bananas&#039;);
$redis-&gt;zAdd(&#039;zs3&#039;, 2, &#039;figs&#039;, 3, &#039;pears&#039;);

$redis-&gt;zInterStore(&#039;fruit-sum&#039;, [&#039;zs1&#039;, &#039;zs2&#039;, &#039;zs3&#039;]);
$redis-&gt;zInterStore(&#039;fruit-max&#039;, [&#039;zs1&#039;, &#039;zs2&#039;, &#039;zs3&#039;], NULL, &#039;MAX&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zscan">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5915">at line 5915</a></div>
        <code class="method-signature language-php">Redis|array|false zscan(string $key, null|int|string $iterator, string|null $pattern = null, int $count = 0)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Scan the members of a sorted set incrementally, using a cursor</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The sorted set to scan.</p></td>
            </tr>
                    <tr>
                <td>null|int|string</td>
                <td>$iterator</td>
                <td><p>A reference to an iterator that should be initialized to NULL initially, that
will be updated after each subsequent call to ZSCAN.  Once the iterator
has returned to zero the scan is complete</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$pattern</td>
                <td><p>An optional glob-style pattern that limits which members are returned during
the scanning process.</p></td>
            </tr>
                    <tr>
                <td>int</td>
                <td>$count</td>
                <td><p>A hint for Redis that tells it how many elements it should test before returning
from the call.  The higher the more work Redis may do in any one given call to
ZSCAN potentially blocking for longer periods of time.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>An array of elements or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zscan/">https://redis.io/docs/latest/commands/zscan/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/scan/">https://redis.io/docs/latest/commands/scan/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_scan">
Redis::scan</a>
                                    </td>
                <td>NOTE:  See Redis::scan() for detailed example code on how to call SCAN like commands.</td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$it = null;
while ($members = $redis-&gt;zscan(&#039;leaders&#039;, $it)) {
    foreach ($members as $member =&gt; $score) {
        printf(&#039;%s =&gt; %s&#039; . PHP_EOL, $member, $score);
    }
}</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zunion">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5952">at line 5952</a></div>
        <code class="method-signature language-php">Redis|array|false zunion(array $keys, array|null $weights = null, array|null $options = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Retrieve the union of one or more sorted sets</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One or more sorted set key names</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$weights</td>
                <td><p>An optional array with floating point weights used when performing the union.
Note that if this argument is passed, it must contain the same number of
elements as the $keys array.</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$options</td>
                <td><p>An array that modifies how this command functions.</p>
<pre><code class="language-php">$options = [
    # By default when members exist in more than one set Redis will SUM
    # total score for each match.  Instead, it can return the AVG, MIN,
    # or MAX value based on this option.
    'AGGREGATE' =&gt; 'sum' | 'min' | 'max'

    # Whether Redis should also return each members aggregated score.
    'WITHSCORES' =&gt; true | false
]</code></pre></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|array|false</td>
            <td><p>The union of each sorted set or false on failure</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zunion/">https://redis.io/docs/latest/commands/zunion/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;del(&#039;store1&#039;, &#039;store2&#039;, &#039;store3&#039;);
$redis-&gt;zAdd(&#039;store1&#039;, 1, &#039;apples&#039;, 3, &#039;pears&#039;, 6, &#039;bananas&#039;);
$redis-&gt;zAdd(&#039;store2&#039;, 3, &#039;apples&#039;, 5, &#039;coconuts&#039;, 2, &#039;bananas&#039;);
$redis-&gt;zAdd(&#039;store3&#039;, 2, &#039;bananas&#039;, 6, &#039;apples&#039;, 4, &#039;figs&#039;);

$redis-&gt;zUnion([&#039;store1&#039;, &#039;store2&#039;, &#039;store3&#039;], NULL, [&#039;withscores&#039; =&gt; true]);
$redis-&gt;zUnion([&#039;store1&#039;, &#039;store3&#039;], [2, .5], [&#039;withscores&#039; =&gt; true]);
$redis-&gt;zUnion([&#039;store1&#039;, &#039;store3&#039;], [2, .5], [&#039;withscores&#039; =&gt; true, &#039;aggregate&#039; =&gt; &#039;MIN&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_zunionstore">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5975">at line 5975</a></div>
        <code class="method-signature language-php">Redis|int|false zunionstore(string $dst, array $keys, array|null $weights = null, string|null $aggregate = null)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Perform a union on one or more Redis sets and store the result in a destination sorted set.</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$dst</td>
                <td><p>The destination set to store the union.</p></td>
            </tr>
                    <tr>
                <td>array</td>
                <td>$keys</td>
                <td><p>One or more input keys on which to perform our union.</p></td>
            </tr>
                    <tr>
                <td>array|null</td>
                <td>$weights</td>
                <td><p>An optional weights array used to weight each input set.</p></td>
            </tr>
                    <tr>
                <td>string|null</td>
                <td>$aggregate</td>
                <td><p>An optional modifier in how Redis will combine duplicate members.
Valid:  'MIN', 'MAX', 'SUM'.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|int|false</td>
            <td><p>The number of members stored in the destination set or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/zunionstore/">https://redis.io/docs/latest/commands/zunionstore/</a>
                                    </td>
                <td></td>
            </tr>
                    <tr>
                <td>
                                            <a href="Redis.html#method_zunion">
Redis::zunion</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;zAdd(&#039;zs1&#039;, 1, &#039;one&#039;, 3, &#039;three&#039;);
$redis-&gt;zAdd(&#039;zs1&#039;, 2, &#039;two&#039;, 4, &#039;four&#039;);
$redis-&gt;zadd(&#039;zs3&#039;, 1, &#039;one&#039;, 7, &#039;five&#039;);

$redis-&gt;zUnionStore(&#039;dst&#039;, [&#039;zs1&#039;, &#039;zs2&#039;, &#039;zs3&#039;]);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
                    <div class="method-item">
                                                                                        
    <h3 id="method_digest">
        <div class="location"><a href="https://github.com/phpredis/phpredis/blob/develop/redis.stub.php#L5989">at line 5989</a></div>
        <code class="method-signature language-php">Redis|string|false digest(string $key)</code>
    </h3>
    <div class="details">    
    
            

        <div class="method-description">
                            <p><p>Ask the server for the XXH3 digest of a given key's value</p></p>                        
        </div>
        <div class="tags">
                            <h4>Parameters</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>string</td>
                <td>$key</td>
                <td><p>The key to retrieve the digest for.</p></td>
            </tr>
            </table>

            
                            <h4 class="return-value-header">Return Value</h4>

                <div class="return-value-content">
                        <table class="table table-condensed">
        <tr>
            <td>Redis|string|false</td>
            <td><p>The XXH3 digest as a string or false on failure.</p></td>
        </tr>
    </table>

                </div>
            
            
                            <h4>See also</h4>

                    <table class="table table-condensed">
                    <tr>
                <td>
                                            <a href="https://redis.io/docs/latest/commands/digest/">https://redis.io/docs/latest/commands/digest/</a>
                                    </td>
                <td></td>
            </tr>
            </table>

            
                            <h4>Examples</h4>

                    <table class="table table-condensed">
                    <tr>
                <td><pre class="examples">$redis-&gt;digest(&#039;session:42&#039;);</pre></td>
            </tr>
            </table>

                    </div>
    </div>

            </div>
            </div>

    
</div><div id="footer">
        Generated by <a href="https://github.com/code-lts/doctum">Doctum, a API Documentation generator and fork of Sami</a>.</div></div>
    </div>
    </body>

</html>
